Comments: on this page. Click to read or post your own.

Class PasswordValidator

Description

This class represents a validator for member passwords.

  1.  $pwdVal new PasswordValidator();
  2.  $pwdValidator->minLength(7);
  3.  $pwdValidator->checkHistoricalPasswords(6);
  4.  $pwdValidator->characterStrength('lowercase','uppercase','digits','punctuation');
  5.  
  6.  Member::set_password_validator($pwdValidator);

Located in /sapphire/security/PasswordValidator.php (line 15)

Object
   |
   --PasswordValidator
Direct descendents
Class Description
NZGovtPasswordValidator This PasswordValidator implements the NZ E-Government Guidelines for passwords
Variable Summary
Method Summary
void characterStrength ($minScore $minScore, $testNames $testNames)
void checkHistoricalPasswords ( $count)
void minLength ( $minLength)
void validate ( $password,  $member)
Variables
static mixed $character_strength_tests = array(
'lowercase' => '/[a-z]/',
'uppercase' => '/[A-Z]/',
'digits' => '/[0-9]/',
'punctuation' => '/[^A-Za-z0-9]/',
)
(line 16)
mixed $historicalPasswordCount (line 23)
  • access: protected
mixed $minLength (line 23)
  • access: protected
mixed $minScore (line 23)
  • access: protected
mixed $testNames (line 23)
  • access: protected

Inherited Variables

Inherited from Object

Object::$builtInMethods
Object::$class
Object::$classConstructed
Object::$extensions
Object::$extension_instances
Object::$extraMethods
Object::$extraStatics
Object::$statics
Object::$static_cached
Methods
characterStrength (line 40)

Check the character strength of the password.

Eg: $this->characterStrength(3, array("lowercase", "uppercase", "digits", "punctuation"))

void characterStrength ($minScore $minScore, $testNames $testNames)
  • $minScore $minScore: The minimum number of character tests that must pass
  • $testNames $testNames: The names of the tests to perform
checkHistoricalPasswords (line 48)

Check a number of previous passwords that the user has used, and don't let them change to that.

void checkHistoricalPasswords ( $count)
  • $count
minLength (line 28)

Minimum password length

void minLength ( $minLength)
  • $minLength
validate (line 52)
void validate ( $password,  $member)
  • $password
  • $member

Inherited Methods

Inherited From Object

Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
blog comments powered by Disqus

Documentation generated on Mon, 12 May 2008 15:15:52 +1200 by phpDocumentor 1.3.2