OpenID
[ class tree: OpenID ] [ index: OpenID ] [ all elements ]

Class: OpenID_Nonce

Source Location: /OpenID-0.4.0/OpenID/Nonce.php

Class Overview


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


Author(s):

Copyright:

  • 2009 Bill Shupp

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 32]
Handles nonce functionality. Requires the OP Endpoint URL nonces are to be associated with.


[ Top ]


Class Variables

$clockSkew =  18000

[line 52]

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

Type:   int


[ Top ]

$opEndpointURL =  null

[line 44]

The OP Endoint URL a nonce is associated with
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 64]

void __construct( string $opEndpointURL, [int $clockSkew = null])

Sets the OP endpoint URL, and optionally the clock skew and custom storage driver.
  • Access: public

Parameters:

string   $opEndpointURL   —  OP Endpoint URL
int   $clockSkew   —  How many seconds old can a nonce be?

[ Top ]

createNonce   [line 142]

string createNonce( [int $length = 6], [int $time = null])

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.

Parameters:

int   $length   —  Lenth of the random string, defaults to 6
int   $time   —  A unix timestamp in seconds

[ Top ]

createNonceAndStore   [line 173]

string createNonceAndStore( [int $length = 6], [int $time = null])

Creates a nonce and also stores it.

Parameters:

int   $length   —  Lenth of the random string, defaults to 6
int   $time   —  A unix timestamp in seconds

[ Top ]

validate   [line 102]

bool validate( mixed $nonce)

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

Parameters:

mixed   $nonce   —  The nonce to validate

[ Top ]

verifyResponseNonce   [line 81]

bool verifyResponseNonce( string $nonce)

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

Parameters:

string   $nonce   —  The nonce from the OP response

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:57:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.