|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.authentication.AuthenticationService
public class AuthenticationService
A service for authenticating a user in Silverpeas. This service is the entry point for any authentication process as it wraps all the mechanism and the delegation to perform the actual authentication. This service wraps all the mechanism to perform the authentication process itself. It uses for doing an authentication server that is mapped with the user domain.
Constructor Summary | |
---|---|
AuthenticationService()
Constructs a new AuthenticationService instance. |
Method Summary | |
---|---|
String |
authenticate(AuthenticationCredential userCredential)
Authenticates a user with the specified authentication credential. |
void |
changePassword(AuthenticationCredential credential,
String newPassword)
Changes the password of the specified user credential with the specified new one. |
void |
changePasswordAndEmail(AuthenticationCredential credential,
String newPassword,
String email)
Changes the password and email of the specified user credential with the specified new ones. |
List<Domain> |
getAllDomains()
Gets all the available user domains. |
String |
getAuthenticationKey(String login,
String domainId)
Gets an authentication key for a given user from its specified login and from the domain to which he belongs. |
boolean |
isInError(String authenticationKey)
Is the specified authentication key represents an error status? |
boolean |
isPasswordChangeAllowed(String domainId)
Is the change of a user password is allowed by specified user domain? |
void |
resetPassword(AuthenticationCredential credential,
String newPassword)
Resets the specified password of the user behind the specified authentication credential with the specified one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String m_JDBCUrl
protected static final String m_AccessLogin
protected static final String m_AccessPasswd
protected static final String m_DriverClass
protected static final String m_DomainTableName
protected static final String m_DomainIdColumnName
protected static final String m_DomainNameColumnName
protected static final String m_DomainAuthenticationServerColumnName
protected static final String m_KeyStoreTableName
protected static final String m_KeyStoreKeyColumnName
protected static final String m_KeyStoreLoginColumnName
protected static final String m_KeyStoreDomainIdColumnName
protected static final String m_UserTableName
protected static final String m_UserIdColumnName
protected static final String m_UserLoginColumnName
protected static final String m_UserDomainColumnName
protected static int m_AutoInc
public static final String ERROR_PWD_EXPIRED
public static final String ERROR_PWD_MUST_BE_CHANGED
public static final String ERROR_INCORRECT_LOGIN_PWD
public static final String ERROR_AUTHENTICATION_FAILURE
public static final String ERROR_PASSWORD_NOT_AVAILABLE
public static final String ERROR_INCORRECT_LOGIN_PWD_DOMAIN
Constructor Detail |
---|
public AuthenticationService()
Method Detail |
---|
public List<Domain> getAllDomains()
public String authenticate(AuthenticationCredential userCredential)
userCredential
- the credential of the user to use to authenticate him.
public boolean isInError(String authenticationKey)
authenticationKey
- the key returned by the authentication process.
public void changePassword(AuthenticationCredential credential, String newPassword) throws AuthenticationException
credential
- the current authentication credential of the user.newPassword
- User new password the new password to set.
AuthenticationException
- if an error occurs while changing the password of the specified
credential.public void changePasswordAndEmail(AuthenticationCredential credential, String newPassword, String email) throws AuthenticationException
credential
- the current authentication credential of the user.newPassword
- User new password the new password to set.email
- User email the email to set.
AuthenticationException
- if an error occurs while changing the password and email of the
specified credential.public String getAuthenticationKey(String login, String domainId) throws AuthenticationException
login
- the user login.domainId
- the unique identifier of the domain of the user.
AuthenticationException
public void resetPassword(AuthenticationCredential credential, String newPassword) throws AuthenticationException
credential
- the authentication credential of the user for which the password has to be
reset.newPassword
- the password with which the credential password will be reset.
AuthenticationException
- if an error occurs while resetting the credential password.public boolean isPasswordChangeAllowed(String domainId)
domainId
- the unique identifier of the user domain.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |