edu.vt.middleware.registry.manage.password
Class CheckPassword

java.lang.Object
  extended by edu.vt.middleware.registry.manage.password.CheckPassword

public final class CheckPassword
extends Object

CheckPassword contains methods for for checking passwords according to Virginia Tech strength requirements. This class is implemented as a singleton since it requires a lot of memory for the dictionaries.

Version:
$Revision: 6276 $
Author:
Daniel Fisher

Field Summary
private  boolean backwardsUserId
          Whether a password should be checked for a backwards user id
private  edu.vt.middleware.password.PasswordCharacterRule charRule
          Rule used to set the character requirements of passwords
private  edu.vt.middleware.password.PasswordDictionaryRule dictRule
          Rule used to set the dictionary requirements of passwords
private  boolean ignoreCaseUserId
          Whether a password should be checked for a case insensitive user id
private static CheckPassword INSTANCE
          Instance of this CheckPassword
private  edu.vt.middleware.password.PasswordLengthRule lengthRule
          Rule used to set the length of passwords
private static Log LOG
          Log for this class
private  String passwordDigest
          Digest name for password history
private  edu.vt.middleware.password.PasswordSequenceRule seqRule
          Rule used to set the sequence requirements of passwords
private  edu.vt.middleware.password.PasswordWhitespaceRule whitespaceRule
          Rule used to check passwords for whitespace
 
Constructor Summary
private CheckPassword()
          Default constructor.
 
Method Summary
 void check(String user, String password, List history)
          This will check the supplied password against the rules that have been adopted at Viginia Tech.
private  void doInit()
          This performs all operations necessary to initialize this singleton.
static CheckPassword getInstance()
          This will return the instance of CheckPassword.
static void main(String[] args)
          This provides command line access to a CheckPassword.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG
Log for this class


INSTANCE

private static final CheckPassword INSTANCE
Instance of this CheckPassword


whitespaceRule

private edu.vt.middleware.password.PasswordWhitespaceRule whitespaceRule
Rule used to check passwords for whitespace


lengthRule

private edu.vt.middleware.password.PasswordLengthRule lengthRule
Rule used to set the length of passwords


charRule

private edu.vt.middleware.password.PasswordCharacterRule charRule
Rule used to set the character requirements of passwords


dictRule

private edu.vt.middleware.password.PasswordDictionaryRule dictRule
Rule used to set the dictionary requirements of passwords


seqRule

private edu.vt.middleware.password.PasswordSequenceRule seqRule
Rule used to set the sequence requirements of passwords


ignoreCaseUserId

private boolean ignoreCaseUserId
Whether a password should be checked for a case insensitive user id


backwardsUserId

private boolean backwardsUserId
Whether a password should be checked for a backwards user id


passwordDigest

private String passwordDigest
Digest name for password history

Constructor Detail

CheckPassword

private CheckPassword()
Default constructor.

Method Detail

getInstance

public static CheckPassword getInstance()
This will return the instance of CheckPassword.

Returns:
CheckPassword

doInit

private void doInit()
This performs all operations necessary to initialize this singleton.


check

public void check(String user,
                  String password,
                  List history)
           throws edu.vt.middleware.password.PasswordException
This will check the supplied password against the rules that have been adopted at Viginia Tech.

Parameters:
user - String to check password for
password - String to check
history - List to check password against
Throws:
edu.vt.middleware.password.PasswordException - if the supplied password does not meet all the requirements of all rules

main

public static void main(String[] args)
                 throws Exception
This provides command line access to a CheckPassword.

Parameters:
args - String[]
Throws:
Exception - if an error occurs


Copyright © 2008 Virginia Tech. All Rights Reserved.