Esri Geoportal Server
1.0

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

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

public class CredentialPolicy
extends Object

Super-class for a credential policy.

A credential policy can provide one or more restrictions associated with the creation or modification of credential. For instance:


Constructor Summary
CredentialPolicy()
          Default constructor.
 
Method Summary
protected  String[] getRestrictedUsernameCharacters()
          Gets the array of characters that are restricted for a new username.
protected  void setRestrictedUsernameCharacters(String[] characters)
          Sets the array of characters that are restricted for a new username.
 void validateEmailPolicy(String email)
          Validates an email address according to policy.
 void validatePasswordPolicy(UsernamePasswordCredentials credentials)
          Validates password credentials according to policy.
 void validateUsernamePolicy(UsernamePasswordCredentials credentials)
          Validates username credentials according to policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialPolicy

public CredentialPolicy()
Default constructor.

Method Detail

getRestrictedUsernameCharacters

protected String[] getRestrictedUsernameCharacters()
Gets the array of characters that are restricted for a new username.

Returns:
the restricted characters.

setRestrictedUsernameCharacters

protected void setRestrictedUsernameCharacters(String[] characters)
Sets the array of characters that are restricted for a new username.

Parameters:
characters - the restricted characters.

validateEmailPolicy

public void validateEmailPolicy(String email)
                         throws EmailPolicyException
Validates an email address according to policy.

Parameters:
email - the email address to check validate
Throws:
EmailPolicyException - if the email policy is violated

validatePasswordPolicy

public void validatePasswordPolicy(UsernamePasswordCredentials credentials)
                            throws CredentialPolicyException
Validates password credentials according to policy.

Parameters:
credentials - the credentials containing the password to validate
Throws:
PasswordPolicyException - if the password policy is violated
PasswordConfirmationException - if the confirmation password does not match the new password
CredentialPolicyException

validateUsernamePolicy

public void validateUsernamePolicy(UsernamePasswordCredentials credentials)
                            throws UsernamePolicyException
Validates username credentials according to policy.

Parameters:
credentials - the credentials containing the username to validate
Throws:
UsernamePolicyException - if the username policy is violated

Esri Geoportal Server
1.0

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