Esri Geoportal Server
1.0

com.esri.gpt.framework.security.credentials
Class UsernamePasswordCredentials

java.lang.Object
  extended by com.esri.gpt.framework.security.credentials.Credentials
      extended by com.esri.gpt.framework.security.credentials.UsernamePasswordCredentials

public class UsernamePasswordCredentials
extends Credentials

Stores username/password credentials.


Constructor Summary
UsernamePasswordCredentials()
          Default constructor.
UsernamePasswordCredentials(String username, String password)
          Constructs with a supplied username and password.
 
Method Summary
 String encryptLdapPassword(String algorithm)
          Encrypts a password according to the algorithm specified.
 void generatePassword()
          Generates and sets random password.
 String getConfirmationPassword()
          Gets the confirmation password.
 String getDistinguishedName()
          Gets the distinguished name for this user.
 String getPassword()
          Gets the password.
 String getTargetedGroupDN()
          Gets the targeted group DN.
 String getUsername()
          Gets the username.
 void setConfirmationPassword(String password)
          Sets the confirmation password.
 void setDistinguishedName(String name)
          Sets the distinguished name for this user.
 void setPassword(String password)
          Sets the password.
 void setTargetedGroupDN(String groupDN)
          Sets the targeted group DN.
 void setUsername(String username)
          Sets the username.
 
Methods inherited from class com.esri.gpt.framework.security.credentials.Credentials
getUsernamePasswordCredentials, hasUsernamePasswordCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsernamePasswordCredentials

public UsernamePasswordCredentials()
Default constructor.


UsernamePasswordCredentials

public UsernamePasswordCredentials(String username,
                                   String password)
Constructs with a supplied username and password.

Parameters:
username - the username
password - the password
Method Detail

getConfirmationPassword

public String getConfirmationPassword()
Gets the confirmation password.
A confirmation password is typically used when a someone is creating a new, or modifying an existing password. They are asked to enter the new password twice in an attempt to avoid a typographical error.

Returns:
the confirmation password

setConfirmationPassword

public void setConfirmationPassword(String password)
Sets the confirmation password.
A confirmation password is typically used when a someone is creating a new, or modifying an existing password. They are asked to enter the new password twice in an attempt to avoid a typographical error.

Parameters:
password - the confirmation password

getDistinguishedName

public String getDistinguishedName()
Gets the distinguished name for this user.
The distinguished name is typically used for an LDAP reference.

Returns:
the distinguished name

setDistinguishedName

public void setDistinguishedName(String name)
Sets the distinguished name for this user.
The distinguished name is typically used for an LDAP reference.
The name is trimmed and stored in lower-case.

Parameters:
name - the distinguished name

getPassword

public String getPassword()
Gets the password.

Returns:
the password

setPassword

public void setPassword(String password)
Sets the password.

Parameters:
password - the password

getTargetedGroupDN

public String getTargetedGroupDN()
Gets the targeted group DN.
In some cases the user may wish to target a metadata management group upon login. The convention is to supply the targeted group name within the username as: myName@@someMetadataManagementGroupname

Returns:
the targeted group DN

setTargetedGroupDN

public void setTargetedGroupDN(String groupDN)
Sets the targeted group DN.
In some cases the user may wish to target a metadata management group upon login. The convention is to supply the targeted group name within the username as: myName@@someMetadataManagementGroupname

Parameters:
groupDN - the targettd group DN

getUsername

public String getUsername()
Gets the username.

Returns:
the username

setUsername

public void setUsername(String username)
Sets the username.

Parameters:
username - the username

encryptLdapPassword

public String encryptLdapPassword(String algorithm)
Encrypts a password according to the algorithm specified.

Parameters:
algorithm - the algorithm (SHA or MD5)
Returns:
the encrypted password

generatePassword

public void generatePassword()
Generates and sets random password.


Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.