Class OpenID_Nonce

Description

Handles nonce functionality. Requires the OP Endpoint URL nonces are to be associated with.

Located in /OpenID/Nonce.php (line 32)


	
			
Class Constant Summary
 RETURN_TO_NONCE = 'openid.1_1_nonce'
Variable Summary
Method Summary
void __construct (string $opEndpointURL, [int $clockSkew = null])
string createNonce ([int $length = 6], [int $time = null])
string createNonceAndStore ([int $length = 6], [int $time = null])
bool validate (mixed $nonce)
bool verifyResponseNonce (string $nonce)
Variables
int $clockSkew = 18000 (line 52)

Default clock skew, i.e. how long in the past we're willing to allow for.

string $opEndpointURL = null (line 44)

The OP Endoint URL a nonce is associated with

  • access: protected
Methods
Constructor __construct (line 64)

Sets the OP endpoint URL, and optionally the clock skew and custom storage driver.

  • access: public
void __construct (string $opEndpointURL, [int $clockSkew = null])
  • string $opEndpointURL: OP Endpoint URL
  • int $clockSkew: How many seconds old can a nonce be?
createNonce (line 143)

Creates a nonce, but does not store it. You may specify the lenth of the random string, as well as the time stamp to use.

string createNonce ([int $length = 6], [int $time = null])
  • int $length: Lenth of the random string, defaults to 6
  • int $time: A unix timestamp in seconds
createNonceAndStore (line 174)

Creates a nonce and also stores it.

string createNonceAndStore ([int $length = 6], [int $time = null])
  • int $length: Lenth of the random string, defaults to 6
  • int $time: A unix timestamp in seconds
validate (line 103)

Validates the syntax of a nonce, as well as checks to see if its timestamp is within the allowed clock skew

bool validate (mixed $nonce)
  • mixed $nonce: The nonce to validate
verifyResponseNonce (line 82)

Checks to see if the response nonce has been seen before. If not, store it and then validate its syntax

  • return: true on success, false on failure
  • access: public
bool verifyResponseNonce (string $nonce)
  • string $nonce: The nonce from the OP response
Class Constants
RETURN_TO_NONCE = 'openid.1_1_nonce' (line 37)

Constant for the parameter used with OpenID 1.1 nonces in the return_to URL

Documentation generated on Tue, 15 Dec 2009 19:00:56 -0800 by phpDocumentor 1.4.3