Home | Trees | Indices | Help |
|
---|
|
object --+ | interface.OpenIDStore --+ | SQLStore
This is the parent class for the SQL stores, which contains the logic common to all of the SQL stores.
The table names used are determined by the class variables settings_table
, associations_table
, and nonces_table
. To change the name of the tables
used, pass new table names into the constructor.
To create the tables with the proper schema, see the createTables
method.
This class shouldn't be used directly. Use one of its subclasses instead, as those contain the code necessary to use a specific database.
All methods other than__init__
and createTables
should be considered implementation
details.
|
|||
__init__(self,
conn,
settings_table=None,
associations_table=None,
nonces_table=None) This creates a new SQLStore instance. |
|||
createTables(self,
*args,
**kwargs) This method creates the database tables necessary for this store to work. |
|||
blobDecode(self,
blob) Convert a blob as returned by the SQL engine into a str object. |
|||
blobEncode(self,
s) Convert a str object into the necessary object for storing in the database as a blob. |
|||
__getattr__(self, attr) | |||
txn_createTables(self) This method creates the database tables necessary for this store to work. |
|||
txn_getAuthKey(self) Get the key for this consumer to use to sign its own communications. |
|||
str
|
getAuthKey(self,
*args,
**kwargs) Get the key for this consumer to use to sign its own communications. |
||
txn_storeAssociation(self,
server_url,
association) Set the association for the server URL. |
|||
NoneType
|
storeAssociation(self,
*args,
**kwargs) Set the association for the server URL. |
||
txn_getAssociation(self,
server_url,
handle=None) Get the most recent association that has been set for this server URL and handle. |
|||
Association or NoneType
|
getAssociation(self,
*args,
**kwargs) Get the most recent association that has been set for this server URL and handle. |
||
txn_removeAssociation(self,
server_url,
handle) Remove the association for the given server URL and handle, returning whether the association existed at all. |
|||
bool or int
|
removeAssociation(self,
*args,
**kwargs) Remove the association for the given server URL and handle, returning whether the association existed at all. |
||
txn_storeNonce(self,
nonce) Add this nonce to the set of extant nonces, ignoring if it is already present. |
|||
NoneType
|
storeNonce(self,
*args,
**kwargs) Add this nonce to the set of extant nonces, ignoring if it is already present. |
||
txn_useNonce(self,
nonce) Return whether this nonce is present, and if it is, then remove it from the set. |
|||
bool or int
|
useNonce(self,
*args,
**kwargs) Return whether this nonce is present, and if it is, then remove it from the set. |
||
Inherited from Inherited from |
|
|||
settings_table = 'oid_settings' This is the default name of the table to keep this store's settings in. |
|||
associations_table = 'oid_associations' This is the default name of the table to keep associations in |
|||
nonces_table = 'oid_nonces' This is the default name of the table to keep nonces in. |
|||
Inherited from |
|
|||
Inherited from |
|
This creates a new SQLStore instance. It requires an established database connection be given to it, and it allows overriding the default table names.
|
This method creates the database tables necessary for this store to work. It should not be called if the tables already exist. |
Convert a blob as returned by the SQL engine into a str object. str -> str |
Convert a str object into the necessary object for storing in the database as a blob. |
|
This method creates the database tables necessary for this store to work. It should not be called if the tables already exist. |
Get the key for this consumer to use to sign its own communications. This function will create a new key if one does not yet exist. () -> str |
Get the key for this consumer to use to sign its own communications. This function will create a new key if one does not yet exist. () -> str
|
Set the association for the server URL. Association -> NoneType |
Set the association for the server URL. Association -> NoneType
|
Get the most recent association that has been set for this server URL and handle. str -> NoneType or Association |
Get the most recent association that has been set for this server URL and handle. str -> NoneType or Association
|
Remove the association for the given server URL and handle, returning whether the association existed at all. (str, str) -> bool |
Remove the association for the given server URL and handle, returning whether the association existed at all. (str, str) -> bool
|
Add this nonce to the set of extant nonces, ignoring if it is already present. str -> NoneType |
Add this nonce to the set of extant nonces, ignoring if it is already present. str -> NoneType
|
Return whether this nonce is present, and if it is, then remove it from the set. str -> bool |
Return whether this nonce is present, and if it is, then remove it from the set. str -> bool
|
|
settings_tableThis is the default name of the table to keep this store's settings in.
|
associations_tableThis is the default name of the table to keep associations in
|
nonces_tableThis is the default name of the table to keep nonces in.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Fri Dec 8 13:26:20 2006 | http://epydoc.sourceforge.net |