atg.security
Interface IdentityManager


public interface IdentityManager

An interface for providing identity management features.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 boolean assumeIdentityById(java.lang.String pId)
          Loads the indicated user identity into the session.
 boolean assumeIdentityByLogin(java.lang.String pLogin)
          Loads the indicated user identity into the session.
 boolean authenticateByPassword(java.lang.String pLogin, java.lang.String pPassword)
          Authenticates a user with the identity and password that are provided.
 boolean checkAuthenticationByPassword(java.lang.String pLogin, java.lang.String pPassword)
          Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.
 boolean checkAuthenticationByPassword(java.lang.String pLogin, java.lang.String pPassword, java.lang.Object pHashkey)
          Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.
 User getUser()
          Returns the current User.
 UserAuthority getUserAuthority()
          Returns the user authority that is used for authenticating a user and/or determining their identity.
 void invalidate()
          Causes invalidation of any cached identity information (eg roles) of the current user, if appropriate.
 boolean isLoggedIn()
          Returns true of the user is properly logged in, false otherwise.
 void logout()
          Clears the user identity, effectively logging them out.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

getUser

User getUser()
Returns the current User.


getUserAuthority

UserAuthority getUserAuthority()
Returns the user authority that is used for authenticating a user and/or determining their identity. This is probably, but is not necessarily, a LoginUserAuthority.


assumeIdentityById

boolean assumeIdentityById(java.lang.String pId)
Loads the indicated user identity into the session. The ID is the user authority persona ID for the user.


assumeIdentityByLogin

boolean assumeIdentityByLogin(java.lang.String pLogin)
Loads the indicated user identity into the session. The ID is determined by the login name of the user.


authenticateByPassword

boolean authenticateByPassword(java.lang.String pLogin,
                               java.lang.String pPassword)
                               throws SecurityException
Authenticates a user with the identity and password that are provided.

Throws:
SecurityException
See Also:
checkAuthenticationByPassword(java.lang.String, java.lang.String)

checkAuthenticationByPassword

boolean checkAuthenticationByPassword(java.lang.String pLogin,
                                      java.lang.String pPassword)
                                      throws SecurityException
Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful.

Throws:
SecurityException
See Also:
authenticateByPassword(java.lang.String, java.lang.String)

checkAuthenticationByPassword

boolean checkAuthenticationByPassword(java.lang.String pLogin,
                                      java.lang.String pPassword,
                                      java.lang.Object pHashkey)
                                      throws SecurityException
Performs an authentication test on a login name and password, but does not cause the assumption of the identity that is being authenticated if successful. This variant uses the given hashKey to test the persistent password with the given password.

Throws:
SecurityException
See Also:
authenticateByPassword(java.lang.String, java.lang.String)

logout

void logout()
Clears the user identity, effectively logging them out. Note that this does not invalidate other session data; it may be advisable, therefore, to invalidate the session rather than (or in addition to) using this method.


isLoggedIn

boolean isLoggedIn()
Returns true of the user is properly logged in, false otherwise.


invalidate

void invalidate()
Causes invalidation of any cached identity information (eg roles) of the current user, if appropriate. This is typically used if you've manipulated a user's role or organizational information and want the currently logged-in user to see the changes immediately.