ome.security.auth
Class FilePasswordProvider
java.lang.Object
ome.security.auth.ConfigurablePasswordProvider
ome.security.auth.FilePasswordProvider
- All Implemented Interfaces:
- PasswordProvider, PasswordUtility
public class FilePasswordProvider
- extends ConfigurablePasswordProvider
Example password provider which uses the given file as password lookup. All
entries in the file are of the form: username=password, where password is in
whatever encoding is configured for the provider
.
Changing passwords is not supported.
- Since:
- 4.0
- Author:
- Josh Moore, josh at glencoesoftware.com
Field Summary |
protected File |
file
Flat file read on each invocation with name, value pairs in Java
Properties notation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
protected final File file
- Flat file read on each invocation with name, value pairs in Java
Properties
notation.
FilePasswordProvider
public FilePasswordProvider(PasswordUtil util,
File file)
FilePasswordProvider
public FilePasswordProvider(PasswordUtil util,
File file,
boolean ignoreUnknown)
hasPassword
public boolean hasPassword(String user)
- Description copied from class:
ConfigurablePasswordProvider
- Always returns false, override with specific logic.
- Specified by:
hasPassword
in interface PasswordProvider
- Overrides:
hasPassword
in class ConfigurablePasswordProvider
checkPassword
public Boolean checkPassword(String user,
String password)
- Description copied from class:
ConfigurablePasswordProvider
- If
ConfigurablePasswordProvider.ignoreUnknown
is true, returns null, since the base class
knows no users. Otherwise, return Boolean.FALSE
specifying that
authentication should fail.
- Specified by:
checkPassword
in interface PasswordProvider
- Overrides:
checkPassword
in class ConfigurablePasswordProvider
doCheckPassword
protected Boolean doCheckPassword(String user,
String password,
Properties p)
getProperties
protected Properties getProperties()
OmeroJava Api
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.