Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcAuthenticationOpenidFileStore

Authentication::ezcAuthenticationOpenidFileStore

Class ezcAuthenticationOpenidFileStore

Class providing file storage for OpenID authentication.

Example of use:

  1.  // create an OpenID options object
  2.  $options = new ezcAuthenticationOpenidOptions();
  3.  $options->mode = ezcAuthenticationOpenidFilter::MODE_SMART;
  4.  
  5.  // define a file store
  6.  $options->store = new ezcAuthenticationOpenidFileStore( '/tmp/store' );
  7.  
  8.  // create an OpenID filter based on the options object
  9.  $filter = new ezcAuthenticationOpenidFilter( $options );

Source for this file: /Authentication/src/filters/openid/openid_file_store.php

ezcAuthenticationOpenidStore
   |
   --ezcAuthenticationOpenidFileStore
Version:   //autogen//

Properties

string read/write $path
The path where the files will be kept. It must exist and it must be writable.

Inherited Member Variables

From ezcAuthenticationOpenidStore
protected ezcAuthenticationOpenidStore::$options

Method Summary

public ezcAuthenticationOpenidFileStore __construct( $path , [ $options = null] )
Creates a new object of this class.
protected string convertToFilename( $value )
Creates a valid filename from the provided string.
public ezcAuthenticationOpenidAssociation getAssociation( $url )
Returns the unserialized association linked to the OpenID provider URL.
public bool removeAssociation( $url )
Removes the association linked to the OpenID provider URL.
public bool storeAssociation( $url , $association )
Stores an association in the store linked to the OpenID provider URL.
public bool storeNonce( $nonce )
Stores the nonce in the store.
public bool|int useNonce( $nonce )
Checks if the nonce exists and afterwards deletes it.

Inherited Methods

From ezcAuthenticationOpenidStore
public abstract ezcAuthenticationOpenidAssociation ezcAuthenticationOpenidStore::getAssociation()
Returns the association linked to the OpenID provider URL.
public ezcAuthenticationOpenidStoreOptions ezcAuthenticationOpenidStore::getOptions()
Returns the options of this class.
public abstract bool ezcAuthenticationOpenidStore::removeAssociation()
Removes the association linked to the OpenID provider URL.
public void ezcAuthenticationOpenidStore::setOptions()
Sets the options of this class to $options.
public abstract bool ezcAuthenticationOpenidStore::storeAssociation()
Stores an association in the store linked to the OpenID provider URL.
public abstract bool ezcAuthenticationOpenidStore::storeNonce()
Stores the nonce in the store.
public abstract bool ezcAuthenticationOpenidStore::useNonce()
Checks if the nonce exists and afterwards deletes it.

Methods

__construct

ezcAuthenticationOpenidFileStore __construct( string $path , [ezcAuthenticationOpenidFileStoreOptions $options = null] )

Creates a new object of this class.

Parameters:
Name Type Description
$path string The path where to save the nonces
$options ezcAuthenticationOpenidFileStoreOptions Options for this class
Exceptions:
Type Description
ezcBaseFilePermissionException if $path cannot be opened for reading and writing
ezcBaseFileNotFoundException if $path does not exist

convertToFilename

string convertToFilename( string $value )

Creates a valid filename from the provided string.

Parameters:
Name Type Description
$value string A string which needs to be used as a valid filename

getAssociation

ezcAuthenticationOpenidAssociation getAssociation( string $url )

Returns the unserialized association linked to the OpenID provider URL.

Returns false if the association could not be retrieved or if it expired.

Parameters:
Name Type Description
$url string The URL of the OpenID provider
Redefinition of:
Method Description
ezcAuthenticationOpenidStore::getAssociation() Returns the association linked to the OpenID provider URL.

removeAssociation

bool removeAssociation( string $url )

Removes the association linked to the OpenID provider URL.

Returns true if the association could be removed, and false otherwise.

Parameters:
Name Type Description
$url string The URL of the OpenID provider
Redefinition of:
Method Description
ezcAuthenticationOpenidStore::removeAssociation() Removes the association linked to the OpenID provider URL.

storeAssociation

bool storeAssociation( string $url , ezcAuthenticationOpenidAssociation $association )

Stores an association in the store linked to the OpenID provider URL.

Returns true if the association was stored successfully, and false otherwise.

Parameters:
Name Type Description
$url string The URL of the OpenID provider
$association ezcAuthenticationOpenidAssociation The association value to store
Exceptions:
Type Description
ezcBaseFilePermissionException if the nonce cannot be written in the store
Redefinition of:
Method Description
ezcAuthenticationOpenidStore::storeAssociation() Stores an association in the store linked to the OpenID provider URL.

storeNonce

bool storeNonce( string $nonce )

Stores the nonce in the store.

Returns true if the nonce was stored successfully, and false otherwise.

Parameters:
Name Type Description
$nonce string The nonce value to store
Exceptions:
Type Description
ezcBaseFilePermissionException if the nonce cannot be written in the store
Redefinition of:
Method Description
ezcAuthenticationOpenidStore::storeNonce() Stores the nonce in the store.

useNonce

bool|int useNonce( string $nonce )

Checks if the nonce exists and afterwards deletes it.

Returns the timestamp of the nonce if it exists, and false otherwise.

Parameters:
Name Type Description
$nonce string The nonce value to check and delete
Redefinition of:
Method Description
ezcAuthenticationOpenidStore::useNonce() Checks if the nonce exists and afterwards deletes it.
Documentation generated by phpDocumentor 1.4.3