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_DumbStore

Description

This is a store for use in the worst case, when you have no way of saving state on the consumer site. Using this store makes the consumer vulnerable to replay attacks, as it's unable to use nonces. Avoid using this store if it is at all possible.

Most of the methods of this class are implementation details. Users of this class need to worry only about the constructor.

Located in /openid/Auth/OpenID/DumbStore.php (line 34)

Class Auth_OpenID_OpenIDStore

Class Auth_OpenID_DumbStore
Method Summary
Constructor Auth_OpenID_DumbStore Auth_OpenID_DumbStore (string $secret_phrase)
Method void getAssociation ( $server_url, [ $handle = null])
Method void getAuthKey ()
Method void isDumb ()
Method void removeAssociation ( $server_url,  $handle)
Method void storeAssociation ( $server_url,  $association)
Method void storeNonce ( $nonce)
Method void useNonce ( $nonce)
Variables
Methods
Constructor Auth_OpenID_DumbStore (line 53)

Creates a new Auth_OpenID_DumbStore instance. For the security of the tokens generated by the library, this class attempts to at least have a secure implementation of getAuthKey.

When you create an instance of this class, pass in a secret phrase. The phrase is hashed with sha1 to make it the correct length and form for an auth key. That allows you to use a long string as the secret phrase, which means you can make it very difficult to guess.

Each Auth_OpenID_DumbStore instance that is created for use by your consumer site needs to use the same $secret_phrase.

Auth_OpenID_DumbStore Auth_OpenID_DumbStore (string $secret_phrase)
  • string $secret_phrase: secret_phrase The phrase used to create the auth key returned by getAuthKey
getAssociation (line 68)

This implementation always returns null.

void 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.
getAuthKey (line 101)

This method returns the auth key generated by the constructor.

void 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.
isDumb (line 110)

This store is a dumb mode store, so this method is overridden to return true.

void isDumb ()

Redefinition of:
Auth_OpenID_OpenIDStore::isDumb()
This method must return true if the store is a dumb-mode-style store. Unlike all other methods in this class, this one provides a default implementation, which returns false.
removeAssociation (line 76)

This implementation always returns false.

void 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 61)

This implementation does nothing.

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 84)

This implementation does nothing.

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 93)

In a system truly limited to dumb mode, nonces must all be accepted. This therefore always returns true, which makes replay attacks feasible.

void 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:56:52 +0000 by phpDocumentor 1.3.1