Package ome.security.auth
Interface PasswordProvider
-
- All Known Implementing Classes:
ConfigurablePasswordProvider
,FilePasswordProvider
,JdbcHashedPasswordProvider
,JdbcPasswordProvider
,LdapPasswordProvider
,LdapPasswordProvider431
,PasswordProviders
public interface PasswordProvider
Authentication interface responsible for checking and changing passwords. In addition, aimplementation
may claim to know nothing for a particular user name. SeecheckPassword(String, String, boolean)
for more information.- Since:
- 4.0
- See Also:
SecuritySystem
,Permissions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
changePassword(java.lang.String user, java.lang.String password)
Attempts to change the password for the given user.java.lang.Boolean
checkPassword(java.lang.String user, java.lang.String password, boolean readOnly)
Authenticates the give user given the password token.boolean
hasPassword(java.lang.String user)
Returns true if this provider considers itself responsible for the given user name.
-
-
-
Method Detail
-
hasPassword
boolean hasPassword(java.lang.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 tocheckPassword(String, String, boolean)
.hasPassword(String)
will not do this. This is typically only of importance duringchangePassword(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
java.lang.Boolean checkPassword(java.lang.String user, java.lang.String password, boolean readOnly)
Authenticates the give user given the password token. May return a nullBoolean
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. If readOnly is false, then some implementations may choose to create new users.
-
changePassword
void changePassword(java.lang.String user, java.lang.String password) throws PasswordChangeException
Attempts to change the password for the given user. May throw aPasswordChangeException
, for example if the provider uses a read-only medium.- Throws:
PasswordChangeException
-
-