ome.security.auth
Interface PasswordProvider

All Known Implementing Classes:
ConfigurablePasswordProvider, FilePasswordProvider, JdbcPasswordProvider, LdapPasswordProvider, PasswordProviders

public interface PasswordProvider

Authentication interface responsible for checking and changing passwords. In addition, a implementation may claim to know nothing for a particular user name. See checkPassword(String, String) for more information.

Since:
4.0
Author:
Josh Moore, josh at glencoesoftware.com
See Also:
SecuritySystem, Permissions

Method Summary
 void changePassword(String user, String password)
          Attempts to change the password for the given user.
 Boolean checkPassword(String user, String password)
          Authenticates the give user given the password token.
 boolean hasPassword(String user)
          Returns true if this provider considers itself responsible for the given user name.
 

Method Detail

hasPassword

boolean hasPassword(String user)
Returns true if this provider considers itself responsible for the given user name. In general, if this method returns false, then checkPassword will return null or false for all possible passwords. However, some providers (like the LDAP provider) may create a user to synchronize with some backend during a call to checkPassword(String, String). hasPassword(String) will not do this. This is typically only of importance during changePassword(String, String) since a provider which is not responsible for a password should not attempt to change it, and before a provider has not created a user, it is also not responsible.


checkPassword

Boolean checkPassword(String user,
                      String password)
Authenticates the give user given the password token. May return a null Boolean in order to signal that this provider is not responsible for the given user and can make no decision. Concrete implementations may decide to return false for all unknown users.


changePassword

void changePassword(String user,
                    String password)
                    throws PasswordChangeException
Attempts to change the password for the given user. May throw a PasswordChangeException, for example if the provider uses a read-only medium.

Throws:
PasswordChangeException


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.