public function GoogleAuthenticator::__construct in Google Authenticator login 7
Same name and namespace in other branches
- 6 ga4php.php \GoogleAuthenticator::__construct()
Constructor.
File
- ./
ga4php.php, line 13 - Abstract GoogleAuthenticator class.
Class
- GoogleAuthenticator
- @file Abstract GoogleAuthenticator class.
Code
public function __construct($totpskew = 1, $hotpskew = 10, $hotphuntvalue = 200000) {
// The hotpskew is how many tokens forward we look to find the input
// code the user used.
$this->hotpSkew = $hotpskew;
// The totpskew value is how many tokens either side of the current
// token we should check, based on a time skew.
$this->totpSkew = $totpskew;
// The hotphuntvalue is what we use to resync tokens.
// when a user resyncs, we search from 0 to $hutphutvalue to find
// the two token codes the user has entered - 200000 seems like overkill
// really as i cant imagine any token out there would ever make it
// past 200000 token code requests.
$this->hotpHuntValue = $hotphuntvalue;
}