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

Class: Auth_OpenID_FileStore

Source Location: /zp-extensions/federated_logon/Auth/OpenID/FileStore.php

Class Auth_OpenID_FileStore

Class Overview

This is a filesystem-based store for OpenID associations and

nonces. This store should be safe for use in concurrent systems on both windows and unix (excluding NFS filesystems). There are a couple race conditions in the system, but those failure cases have been set up in such a way that the worst-case behavior is someone having to try to log in a second time.

Most of the methods of this class are implementation details. People wishing to just use this store need only pay attention to the constructor.

Located in /zp-extensions/federated_logon/Auth/OpenID/FileStore.php [line 39]

Auth_OpenID_OpenIDStore
   |
   --Auth_OpenID_FileStore
Author(s): Information Tags:

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Auth_OpenID_OpenIDStore

Auth_OpenID_OpenIDStore::cleanup()
Auth_OpenID_OpenIDStore::cleanupAssociations()
Auth_OpenID_OpenIDStore::cleanupNonces()
Auth_OpenID_OpenIDStore::getAssociation()
This method returns an Association object from storage that matches the server URL and, if specified, handle. It returns null if no such association is found or if the matching association is expired.
Auth_OpenID_OpenIDStore::removeAssociation()
This method removes the matching association if it's found, and returns whether the association was removed or not.
Auth_OpenID_OpenIDStore::reset()
Removes all entries from the store; implementation is optional.
Auth_OpenID_OpenIDStore::storeAssociation()
This method puts an Association object into storage, retrievable by server URL and handle.
Auth_OpenID_OpenIDStore::supportsCleanup()
Report whether this storage supports cleanup
Auth_OpenID_OpenIDStore::useNonce()
Called when using a nonce.

[ Top ]
Method Summary
Auth_OpenID_FileStore   Auth_OpenID_FileStore()   Initializes a new Auth_OpenID_FileStore. This initializes the nonce and association directories, which are subdirectories of the directory passed in.
void   clean()  
void   cleanupAssociations()  
void   cleanupNonces()  
void   destroy()  
mixed   getAssociation()   Retrieve an association. If no handle is specified, return the association with the most recent issue time.
string   getAssociationFilename()   Create a unique filename for a given server url and
bool   removeAssociation()   Remove an association if it exists. Do nothing if it does not.
void   storeAssociation()   Store an association in the association directory.
bool   useNonce()   Return whether this nonce is present. As a side effect, mark it as no longer present.

[ Top ]
Methods
Constructor Auth_OpenID_FileStore  [line 49]

  Auth_OpenID_FileStore Auth_OpenID_FileStore( string $directory  )

Initializes a new Auth_OpenID_FileStore. This initializes the nonce and association directories, which are subdirectories of the directory passed in.

Parameters:
string   $directory:  This is the directory to put the store directories in.


[ Top ]
clean  [line 440]

  void clean( )



[ Top ]
cleanupAssociations  [line 604]

  void cleanupAssociations( )



Redefinition of:
Auth_OpenID_OpenIDStore::cleanupAssociations()

[ Top ]
cleanupNonces  [line 119]

  void cleanupNonces( )



Redefinition of:
Auth_OpenID_OpenIDStore::cleanupNonces()

[ Top ]
destroy  [line 77]

  void destroy( )



[ Top ]
getAssociation  [line 232]

  mixed getAssociation( $server_url, [ $handle = null]  )

Retrieve an association. If no handle is specified, return the association with the most recent issue time.

Parameters:
   $server_url: 
   $handle: 


Redefinition of:
Auth_OpenID_OpenIDStore::getAssociation()
This method returns an Association object from storage that matches the server URL and, if specified, handle. It returns null if no such association is found or if the matching association is expired.

[ Top ]
getAssociationFilename  [line 150]

  string getAssociationFilename( $server_url, $handle  )

Create a unique filename for a given server url and

handle. This implementation does not assume anything about the format of the handle. The filename that is returned will contain the domain name from the server URL for ease of human inspection of the data directory.

Parameters:
   $server_url: 
   $handle: 


[ Top ]
removeAssociation  [line 338]

  bool removeAssociation( $server_url, $handle  )

Remove an association if it exists. Do nothing if it does not.

Parameters:
   $server_url: 
   $handle: 


Redefinition of:
Auth_OpenID_OpenIDStore::removeAssociation()
This method removes the matching association if it's found, and returns whether the association was removed or not.

[ Top ]
storeAssociation  [line 182]

  void storeAssociation( $server_url, $association  )

Store an association in the association directory.

Parameters:
   $server_url: 
   $association: 


Redefinition of:
Auth_OpenID_OpenIDStore::storeAssociation()
This method puts an Association object into storage, retrievable by server URL and handle.

[ Top ]
useNonce  [line 360]

  bool useNonce( $server_url, $timestamp, $salt  )

Return whether this nonce is present. As a side effect, mark it as no longer present.

Parameters:
   $server_url: 
   $timestamp: 
   $salt: 


Redefinition of:
Auth_OpenID_OpenIDStore::useNonce()
Called when using a nonce.

[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:07:12 +0100 by phpDocumentor 1.4.3