Package com.iizix.user
Class UserIdentifier
java.lang.Object
com.iizix.user.UserIdentifier
- Direct Known Subclasses:
- SessionUserIdentifier
The User identifier class holds the information about a user or a returning user. The User may, if the application allows it, run several individual session or the same virtual session in parallel. This is configurable, and allows the same user to run different independent sessions by assigning a session ID. In this case, the class 
SessionUserIdentifier is used.- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- createSessionUserIdentifier- (String sessionID) Creates a SessionUserIdentifier from this instance.- booleanChecks if another UserIdentifier equals this one.- getLoginContext- (String name, ArrayList<TextOutputCallback> output) Gets the login context for the user.Gets the password specified in the user session.- final StringGets the User ID.- final int- hashCode()Hash code, unique for each user identifier.- protected StringFormats the value as a string to add to- paramString.- toString()Returns a string representation of this user identifier and its values.- void- updatePassword- (String password) Updates the password for the user.
- Constructor Details- UserIdentifierConstructor.- Parameters:
- userID- User ID, non-empty, not null.
- password- The password, non-empty, not null.
- Throws:
- NullPointerException- If any parameter is null.
- IllegalArgumentException- If any parameter is empty.
 
 
- Method Details- createSessionUserIdentifierCreates a SessionUserIdentifier from this instance.- Parameters:
- sessionID- The session ID, non-empty, not null.
- Throws:
- NullPointerException- If any parameter is null.
- IllegalArgumentException- If any parameter is empty.
 
- getUserIDGets the User ID.
- updatePasswordUpdates the password for the user.- Parameters:
- password- The updated password.
- Throws:
- NullPointerException- If password is null.
- IllegalArgumentException- If any parameter is empty.
 
- getPasswordGets the password specified in the user session. Once retrieved by the authentication system, the password is cleared and no longer available.- Returns:
- The password, null if already retrieved.
 
- equalsChecks if another UserIdentifier equals this one.- Comparison includes the Session ID. - Password is excluded in the verification as it is not available once checked. 
- hashCodepublic final int hashCode()Hash code, unique for each user identifier.
- paramStringFormats the value as a string to add to- paramString.
- toStringReturns a string representation of this user identifier and its values.
- getLoginContextpublic LoginContext getLoginContext- (String name, ArrayList<TextOutputCallback> output) throws LoginException Gets the login context for the user.- Parameters:
- name- The name of the configuration entry.
- output- The array that is filled with output texts during login.
- Returns:
- The login context.
- Throws:
- LoginException- if the caller-specified- namedoes not appear in the- Configurationand there is no- Configurationentry for "other", or if the caller-specified- callbackHandleris- null.
- SecurityException- if a SecurityManager is set and the caller does not have AuthPermission("createLoginContext.name"), or if a configuration entry for name does not exist and the caller does not additionally have AuthPermission("createLoginContext.other").