12 require_once
'Auth/OpenID/CryptUtil.php';
17 define(
'Auth_OpenID_Nonce_CHRS',
"abcdefghijklmnopqrstuvwxyz" .
18 "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
26 define(
'Auth_OpenID_Nonce_REGEX',
27 '/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)Z(.*)/');
29 define(
'Auth_OpenID_Nonce_TIME_FMT',
30 '%Y-%m-%dT%H:%M:%SZ');
36 if (
$result != 1 || count($matches) != 8) {
47 $uniquifier) = $matches;
50 @gmmktime($tm_hour, $tm_min, $tm_sec, $tm_mon, $tm_mday, $tm_year);
67 if ($allowed_skew === null) {
83 $past = $now - $allowed_skew;
86 $future = $now + $allowed_skew;
90 return (($past <= $stamp) && ($stamp <= $future));
106 return $time_str . $salt;
Auth_OpenID_splitNonce($nonce_string)
const Auth_OpenID_Nonce_CHRS
Need CryptUtil to generate random strings.
static randomString($length, $population=null)
Produce a string of length random bytes, chosen from chrs.
foreach($mandatory_scripts as $file) $timestamp
Auth_OpenID_mkNonce($when=null)
const Auth_OpenID_Nonce_REGEX
const Auth_OpenID_Nonce_TIME_FMT
Auth_OpenID_checkTimestamp($nonce_string, $allowed_skew=null, $now=null)