|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.common.security.PasswordManager
public class PasswordManager
Class managing passwords in a file. Retrieves, Creates, deletes, updates
| Nested Class Summary | |
|---|---|
static class |
PasswordManager.ClientApplicationType
|
| Constructor Summary | |
|---|---|
PasswordManager(AuthenticationInfo authenticationInfo,
PasswordManager.ClientApplicationType clientApplicationType)
Creates a new PasswordManager object |
|
PasswordManager(java.lang.String securityPropertiesFileLocation)
Creates a new PasswordManager object |
|
PasswordManager(java.lang.String securityPropertiesFileLocation,
PasswordManager.ClientApplicationType clientApplicationType)
Creates a new PasswordManager object Loads Security related
properties from a file. |
|
| Method Summary | |
|---|---|
boolean |
authenticateUser(java.lang.String username,
java.lang.String candidatePassword)
Tries to authenticate a user with a given password |
void |
deleteUser(java.lang.String username)
Delete a user from the password file |
java.lang.String |
getApplicationSpecificUsername(java.lang.String username)
Refactor a username prior to adding it into the list. |
AuthenticationInfo |
getAuthenticationInfo()
|
java.lang.String |
getClearTextPasswordForUser(java.lang.String username)
Get clear text password for a username: decrypts password if needed |
PasswordManager.ClientApplicationType |
getClientApplicationType()
|
java.lang.String |
getEncryptedPasswordForUser(java.lang.String username)
Get Encrypted (or "as it is") password for a user |
TungstenProperties |
loadPasswordsAsTungstenProperties()
Passwords loaded from file as TungstenProperties. |
void |
setClientApplicationType(PasswordManager.ClientApplicationType clientApplicationType)
|
void |
setPasswordForUser(java.lang.String username,
java.lang.String password)
Set and store the password for a given user. |
void |
try_createAuthenticationInfoFiles()
When possible, tries to create files needed by the Password Manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PasswordManager(java.lang.String securityPropertiesFileLocation)
throws ConfigurationException
PasswordManager object
securityPropertiesFileLocation - location of the security.properties
file. If set to null will look for the default file.
ConfigurationException
public PasswordManager(java.lang.String securityPropertiesFileLocation,
PasswordManager.ClientApplicationType clientApplicationType)
throws ConfigurationException
PasswordManager object Loads Security related
properties from a file. File location =
{clusterhome}/conf/security.properties
securityPropertiesFileLocation - location of the security.properties
file. If set to null will look for the default file.clientApplicationType - Type of client application. Used to retrieve
application specific information (password, ...)
ConfigurationException
public PasswordManager(AuthenticationInfo authenticationInfo,
PasswordManager.ClientApplicationType clientApplicationType)
PasswordManager object
authenticationInfo - the AuthenticationInfo object from
which to retrieve propertiesclientApplicationType - Type of client application. Used to retrieve
application specific information (password, ...)| Method Detail |
|---|
public TungstenProperties loadPasswordsAsTungstenProperties()
throws ServerRuntimeException
ServerRuntimeException
public java.lang.String getClearTextPasswordForUser(java.lang.String username)
throws ConfigurationException
username - the username for which to get the password
ConfigurationException
public java.lang.String getEncryptedPasswordForUser(java.lang.String username)
throws ConfigurationException
username - the username for which to get the password
ConfigurationException
public boolean authenticateUser(java.lang.String username,
java.lang.String candidatePassword)
throws ConfigurationException
username - candidatePassword -
ConfigurationException
public void setPasswordForUser(java.lang.String username,
java.lang.String password)
throws ServerRuntimeException
username - password -
ServerRuntimeException
public void deleteUser(java.lang.String username)
throws ServerRuntimeException
username - the username to be deleted from the password file
ServerRuntimeExceptionpublic java.lang.String getApplicationSpecificUsername(java.lang.String username)
username - the username to refactor for the current application
public void try_createAuthenticationInfoFiles()
throws ConfigurationException
ConfigurationExceptionpublic AuthenticationInfo getAuthenticationInfo()
public PasswordManager.ClientApplicationType getClientApplicationType()
public void setClientApplicationType(PasswordManager.ClientApplicationType clientApplicationType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||