Package com.priint.pubserver.usermanager
Class PubServerUser
java.lang.Object
com.priint.pubserver.usermanager.PubServerUser
- All Implemented Interfaces:
Serializable
Class representing a user of pubserver kernel, authenticated by some internal or external realm.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple data object for parsing and formatting qualified login strings. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorPubServerUser(String loginName) Constructor with login name. -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringdecryptSalt(String encryptedSalt) static final StringencryptSalt(String salt) This method return encrypted saltstatic final StringgenerateHashPassword(String password, String encryptedPasswordSalt) Generate a hash for password stringstatic final StringgetEmail()Gets the name of entity for the given login to use in plug-in configuration objects.Gets the path of entity for the given login to use in plug-in configuration objects.static StringgetPluginConfigPath(String loginName) Gets the path of entity for the given login to use in plug-in configuration objects.booleanisActive()booleanvoidsetActive(boolean active) Set information about whether the account is activevoidsetClients(List<String> clients) voidsetCreated(Date created) Set value when user was created in applicationvoidSet user emailvoidsetExpiryDate(Date expiryDate) Set expiry date to user accountvoidsetFirstName(String firstName) Set user first namevoidsetIdentifier(String identifier) Set user identifiervoidsetLastName(String lastName) Set user last namevoidsetLoginName(String loginName) Set user login namevoidsetPasswordHash(String passwordHash) Set encrypte user passwordvoidsetPasswordSalt(String passwordSalt) Salt password parametervoidsetShouldChangePassword(boolean shouldChangePassword) Set information about whether the user should change password
-
Field Details
-
ADMIN_LOGIN
Default admin login name- See Also:
-
CONFIG_TYPE_NAME
Default user config type name- See Also:
-
-
Constructor Details
-
PubServerUser
public PubServerUser()Default constructor -
PubServerUser
Constructor with login name. When login name is null then the IllegalArgumentException will be thrown- Parameters:
loginName- User loign name
-
-
Method Details
-
getIdentifier
- Returns:
- User identifier
-
setIdentifier
Set user identifier -
getLoginName
- Returns:
- User login name
-
setLoginName
Set user login name -
getFirstName
- Returns:
- User first name
-
setFirstName
Set user first name -
getLastName
- Returns:
- User last name
-
setLastName
Set user last name -
getEmail
- Returns:
- User email
-
setEmail
Set user email -
getCreated
- Returns:
- Info when user was created in application
-
setCreated
Set value when user was created in application -
getExpiryDate
- Returns:
- User account expiry date
-
setExpiryDate
Set expiry date to user account -
getPasswordSalt
- Returns:
- User passowrd salt
-
setPasswordSalt
Salt password parameter -
getPasswordHash
- Returns:
- Encrypted user password
-
setPasswordHash
Set encrypte user password -
isActive
public boolean isActive()- Returns:
- Information about whether the account is active
-
setActive
public void setActive(boolean active) Set information about whether the account is active -
isShouldChangePassword
public boolean isShouldChangePassword()- Returns:
- Information about whether the user should change password
-
setShouldChangePassword
public void setShouldChangePassword(boolean shouldChangePassword) Set information about whether the user should change password -
getClients
-
setClients
-
generateHashPassword
Generate a hash for password string- Parameters:
password-encryptedPasswordSalt-- Returns:
- hashed password
-
encryptSalt
This method return encrypted salt- Parameters:
salt-- Returns:
- encrypted salt
-
decryptSalt
- Parameters:
encryptedSalt-- Returns:
- decrypted salt
-
generateNewSalt
- Returns:
- new randomly generated salt
-
getPluginConfigName
Gets the name of entity for the given login to use in plug-in configuration objects. E.g. "johndoe.xml"- Returns:
- string containing repository path
-
getPluginConfigPath
Gets the path of entity for the given login to use in plug-in configuration objects.- Returns:
- string containing repository path
-
getPluginConfigPath
Gets the path of entity for the given login to use in plug-in configuration objects.- Returns:
- string containing repository path
-