public class UserIdentifier extends Object
SessionUserIdentifier
is used.Constructor and Description |
---|
UserIdentifier(String userID,
String password)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SessionUserIdentifier |
createSessionUserIdentifier(String sessionID)
Creates a SessionUserIdentifier from this instance.
|
boolean |
equals(Object o)
Checks if another UserIdentifier equals this one.
|
LoginContext |
getLoginContext(String name,
ArrayList<TextOutputCallback> output)
Gets the login context for the user.
|
String |
getPassword()
Gets the password specified in the user session.
|
String |
getUserID()
Gets the User ID.
|
int |
hashCode()
Hash code, unique for each user identifier.
|
protected String |
paramString()
Formats the value as a string to add to
paramString . |
String |
toString()
Returns a string representation of this user identifier and its values.
|
void |
updatePassword(String password)
Updates the password for the user.
|
public UserIdentifier(String userID, String password)
userID
- User ID, non-empty, not null.password
- The password, non-empty, not null.NullPointerException
- If any parameter is null.IllegalArgumentException
- If any parameter is empty.public SessionUserIdentifier createSessionUserIdentifier(String sessionID)
sessionID
- The session ID, non-empty, not null.NullPointerException
- If any parameter is null.IllegalArgumentException
- If any parameter is empty.public final String getUserID()
public void updatePassword(String password)
password
- The updated password.NullPointerException
- If password is null.IllegalArgumentException
- If any parameter is empty.public String getPassword()
public boolean equals(Object o)
Comparison includes the Session ID.
Password is excluded in the verification as it is not available once checked.
public final int hashCode()
protected String paramString()
paramString
.public String toString()
public LoginContext getLoginContext(String name, ArrayList<TextOutputCallback> output) throws LoginException
name
- The name of the configuration entry.output
- The array that is filled with output texts during login.LoginException
- if the caller-specified name
does not appear in the Configuration
and there is no Configuration
entry
for "other", or if the caller-specified
callbackHandler
is 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").iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.