|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CredentialHandler
This interface encapsulates the handling of security credentials.
This provides a central placeholder for changing the mapping of user
credentials. The default implementation only supports PasswordCredential
A security implementation wanting to map additional credentials should do so here.
| Method Summary | |
|---|---|
boolean |
authenticate(java.lang.String userName,
java.lang.String password)
Authenticate a user. |
java.util.Set |
getPrivateCredentials(java.lang.String username)
Gets the private credentials for the user. |
java.util.Set |
getPublicCredentials(java.lang.String username)
Gets the public credentials for the user. |
void |
importPassword(java.lang.String userName,
java.lang.String newPassword)
Adds or updates a private password credential. Note that there is no checking of the oldPassword and the provided password is
assumed to be encoded. |
void |
setPassword(java.lang.String userName,
java.lang.String oldPassword,
java.lang.String newPassword)
Adds or updates a private password credential. If oldPassword is not null, the oldPassword will first be checked (authenticated). |
void |
setPasswordEnabled(java.lang.String userName,
boolean enabled)
Set the enabled state of the user password credential. |
void |
setPasswordExpiration(java.lang.String userName,
java.sql.Date expirationDate)
Set the expiration date and the expired flag of the password credential. |
void |
setPasswordUpdateRequired(java.lang.String userName,
boolean updateRequired)
Set the update required state of the user password credential. |
| Method Detail |
|---|
java.util.Set getPublicCredentials(java.lang.String username)
Gets the public credentials for the user.
username - The username.
java.util.Set getPrivateCredentials(java.lang.String username)
Gets the private credentials for the user.
username - The username.
void importPassword(java.lang.String userName,
java.lang.String newPassword)
throws SecurityException
Adds or updates a private password credential.
Note that there is no checking of the oldPassword and the provided password is
assumed to be encoded. Hence no encoding will take place.
username - The user to be updated.newPassword - The new password.
SecurityException - Throws a SecurityException.
void setPassword(java.lang.String userName,
java.lang.String oldPassword,
java.lang.String newPassword)
throws SecurityException
Adds or updates a private password credential.
If oldPassword is not null, the oldPassword will first be checked (authenticated).
username - The user to be updated.oldPassword - The old password.newPassword - The new password.
SecurityException - Throws a SecurityException.
void setPasswordUpdateRequired(java.lang.String userName,
boolean updateRequired)
throws SecurityException
Set the update required state of the user password credential.
userName - The user name.updateRequired - The update required state.
Throws - a security exception.
SecurityException
void setPasswordEnabled(java.lang.String userName,
boolean enabled)
throws SecurityException
Set the enabled state of the user password credential.
userName - The user name.enabled - The enabled state.
Throws - a security exception.
SecurityException
void setPasswordExpiration(java.lang.String userName,
java.sql.Date expirationDate)
throws SecurityException
Set the expiration date and the expired flag of the password credential.
If a date equal or before the current date is provided, the expired flag will be set to true, otherwise to false.
userName - The user name.expirationDate - The expiration date to set.
Throws - a security exception.
SecurityException
boolean authenticate(java.lang.String userName,
java.lang.String password)
throws SecurityException
Authenticate a user.
userName - The user name.password - The user password.
SecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||