Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: OpenID

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class Auth_OpenID_FileStore

Description

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 /openid/Auth/OpenID/FileStore.php (line 39)

Class Auth_OpenID_OpenIDStore

Class Auth_OpenID_FileStore
Method Summary
Constructor Auth_OpenID_FileStore Auth_OpenID_FileStore (string $directory)
Method void clean ()
Method string createAuthKey ()
Method void destroy ()
Method mixed getAssociation ( $server_url, [ $handle = null])
Method string getAssociationFilename ( $server_url,  $handle)
Method string getAuthKey ()
Method mixed readAuthKey ()
Method bool removeAssociation ( $server_url,  $handle)
Method void storeAssociation ( $server_url,  $association)
Method void storeNonce ( $nonce)
Method bool useNonce ( $nonce)
Variables
Methods
Constructor Auth_OpenID_FileStore (line 49)

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

Auth_OpenID_FileStore Auth_OpenID_FileStore (string $directory)
  • string $directory: This is the directory to put the store directories in.
clean (line 486)

Remove expired entries from the database. This is potentially expensive, so only run when it is acceptable to take time.

void clean ()
createAuthKey (line 152)

Generate a new random auth key and safely store it in the location specified by $this->auth_key_name.

string createAuthKey ()
destroy (line 79)
void destroy ()
getAssociation (line 306)

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

mixed getAssociation ( $server_url, [ $handle = null])
  • $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.
getAssociationFilename (line 224)

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.

string getAssociationFilename ( $server_url,  $handle)
  • $server_url
  • $handle
getAuthKey (line 192)

Retrieve the auth key from the file specified by $this->auth_key_name, creating it if it does not exist.

string getAuthKey ()

Redefinition of:
Auth_OpenID_OpenIDStore::getAuthKey()
This method returns a key used to sign the tokens, to ensure that they haven't been tampered with in transit. It should return the same key every time it is called. The key returned should be AUTH_KEY_LEN bytes long.
readAuthKey (line 128)

Read the auth key from the auth key file. Will return None if there is currently no key.

mixed readAuthKey ()
removeAssociation (line 413)

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

bool removeAssociation ( $server_url,  $handle)
  • $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.
storeAssociation (line 256)

Store an association in the association directory.

void storeAssociation ( $server_url,  $association)
  • $server_url
  • $association

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

Mark this nonce as present.

void storeNonce ( $nonce)
  • $nonce

Redefinition of:
Auth_OpenID_OpenIDStore::storeNonce()
Stores a nonce. This is used by the consumer to prevent replay attacks.
useNonce (line 454)

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

bool useNonce ( $nonce)
  • $nonce

Redefinition of:
Auth_OpenID_OpenIDStore::useNonce()
This method is called when the library is attempting to use a nonce. If the nonce is in the store, this method removes it and returns a value which evaluates as true. Otherwise it returns a value which evaluates as false.

Inherited Methods

Inherited From Auth_OpenID_OpenIDStore

 Auth_OpenID_OpenIDStore::getAssociation()
 Auth_OpenID_OpenIDStore::getAuthKey()
 Auth_OpenID_OpenIDStore::isDumb()
 Auth_OpenID_OpenIDStore::removeAssociation()
 Auth_OpenID_OpenIDStore::reset()
 Auth_OpenID_OpenIDStore::storeAssociation()
 Auth_OpenID_OpenIDStore::storeNonce()
 Auth_OpenID_OpenIDStore::useNonce()

Documentation generated on Mon, 05 Mar 2007 20:59:19 +0000 by phpDocumentor 1.3.1