com.mf.roundhouse.core.action
Class PasswordValidator

java.lang.Object
  extended bycom.mf.roundhouse.core.action.PasswordValidator

public class PasswordValidator
extends java.lang.Object

Provides password validation services

Author:
Pete Luellen

Field Summary
static java.util.regex.Pattern PATTERN_ALPHABETIC
           
static java.util.regex.Pattern PATTERN_ALPHANUMERIC
           
static java.util.regex.Pattern PATTERN_CONTAINS_DIGIT
           
static java.util.regex.Pattern PATTERN_CONTAINS_LOWER
           
static java.util.regex.Pattern PATTERN_CONTAINS_UPPER
           
 
Constructor Summary
PasswordValidator()
           
 
Method Summary
 boolean passwordHasExpired(UserProfile user)
           
 boolean passwordOlderThanPolicy(UserProfile user)
           
 ActionErrors validate(UserProfile user, java.lang.String clearTextPassword)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATTERN_CONTAINS_DIGIT

public static final java.util.regex.Pattern PATTERN_CONTAINS_DIGIT

PATTERN_CONTAINS_LOWER

public static final java.util.regex.Pattern PATTERN_CONTAINS_LOWER

PATTERN_CONTAINS_UPPER

public static final java.util.regex.Pattern PATTERN_CONTAINS_UPPER

PATTERN_ALPHABETIC

public static final java.util.regex.Pattern PATTERN_ALPHABETIC

PATTERN_ALPHANUMERIC

public static final java.util.regex.Pattern PATTERN_ALPHANUMERIC
Constructor Detail

PasswordValidator

public PasswordValidator()
Method Detail

validate

public ActionErrors validate(UserProfile user,
                             java.lang.String clearTextPassword)
Parameters:
user -
Returns:
ActionErrors - the set of validation errors

passwordHasExpired

public boolean passwordHasExpired(UserProfile user)
Parameters:
user -
Returns:
an indication of whether or not the specified user's password has expired. A user's password has expired when the policy has a positive expiration interval, and the most recent entry in the user's password history is older than that allowed by the expiration interval.
Throws:
java.lang.Exception

passwordOlderThanPolicy

public boolean passwordOlderThanPolicy(UserProfile user)
Parameters:
user -
Returns:
an indication of whether or not the user's password is older than the password policy. A user's password is older than the password policy when there is an active password policy and the policy activation date is more recent than the most recent entry in the user's password history.
Throws:
java.lang.Exception


Copyright © 2004 Media Fortress, LLC. Licensed for commercial use under the Apache 2.0 License.