Home | Trees | Index | Help |
|
---|
Package openid :: Package store :: Module filestore :: Class FileOpenIDStore |
|
object
--+ |OpenIDStore
--+ | FileOpenIDStore
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
method.__init__
Method Summary | |
---|---|
Initializes a new FileOpenIDStore. | |
Remove expired entries from the database. | |
int |
Remove expired associations from the store. |
int |
Remove expired nonces from the store. |
Retrieve an association. | |
Create a unique filename for a given server url and handle. | |
Remove an association if it exists. | |
Store an association in the association directory. | |
Return whether this nonce is valid. | |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
Method Details |
---|
__init__(self,
directory)
Initializes a new FileOpenIDStore. This initializes the nonce and
association directories, which are subdirectories of the directory
passed in.
|
cleanup(self)Remove expired entries from the database. This is potentially expensive, so only run when it is acceptable to take time. () -> NoneType
|
cleanupAssociations(self)Remove expired associations from the store. This method is not called in the normal operation of the library. It provides a way for store admins to keep their storage from filling up with expired data.
|
cleanupNonces(self)Remove expired nonces from the store. Discards any nonce from storage that is old enough that its
timestamp would not pass
|
getAssociation(self, server_url, handle=None)Retrieve an association. If no handle is specified, return the association with the latest expiration. (str, str or NoneType) -> Association or NoneType |
getAssociationFilename(self, 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. (str, str) -> str |
removeAssociation(self, server_url, handle)Remove an association if it exists. Do nothing if it does not. (str, str) -> bool |
storeAssociation(self, server_url, association)Store an association in the association directory. (str, Association) -> NoneType |
useNonce(self, server_url, timestamp, salt)Return whether this nonce is valid. str -> bool
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 27 15:48:22 2008 | http://epydoc.sf.net |