| Home | Trees | Index | Help |
|
|---|
| Package openid :: Package store :: Module sqlstore :: Class SQLStore |
|
object--+ |OpenIDStore--+ | SQLStore
MySQLStore,
PostgreSQLStore,
SQLiteStoreThis 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, and associations_table. To change the name of
the tables used, pass new table names into the constructor.nonces_table
To create the tables with the proper schema, see the method.createTables
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.
| Method Summary | |
|---|---|
This creates a new SQLStore instance. | |
This method creates the database tables necessary for this store to work. | |
__getattr__(self,
attr)
| |
Convert a blob as returned by the SQL engine into a str object. | |
Convert a str object into the necessary object for storing in the database as a blob. | |
Get the most recent association that has been set for this server URL and handle. | |
Get the key for this consumer to use to sign its own communications. | |
Remove the association for the given server URL and handle, returning whether the association existed at all. | |
Set the association for the server URL. | |
Add this nonce to the set of extant nonces, ignoring if it is already present. | |
This method creates the database tables necessary for this store to work. | |
Get the most recent association that has been set for this server URL and handle. | |
Get the key for this consumer to use to sign its own communications. | |
Remove the association for the given server URL and handle, returning whether the association existed at all. | |
Set the association for the server URL. | |
Add this nonce to the set of extant nonces, ignoring if it is already present. | |
Return whether this nonce is present, and if it is, then remove it from the set. | |
Return whether this nonce is present, and if it is, then remove it from the set. | |
Inherited from OpenIDStore:
isDumb
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
| |
| Class Variable Summary | |
|---|---|
str |
associations_table: This is the default name of the table to keep associations in |
str |
nonces_table: This is the default name of the table to keep nonces in. |
str |
settings_table: This is the default name of the table to keep this store's settings
in. |
Inherited from OpenIDStore:
AUTH_KEY_LEN
| |
| Method Details |
|---|
__init__(self,
conn,
settings_table=None,
associations_table=None,
nonces_table=None)
This creates a new SQLStore instance. It requires an established
database connection be given to it, and it allows overriding the
default table names.
|
createTables(self, *args, **kwargs)This method creates the database tables necessary for this store to work. It should not be called if the tables already exist. |
blobDecode(self, blob)Convert a blob as returned by the SQL engine into a str object. str -> str |
blobEncode(self, s)Convert a str object into the necessary object for storing in the database as a blob. |
getAssociation(self, *args, **kwargs)Get the most recent association that has been set for this server URL and handle. str -> NoneType or Association |
getAuthKey(self, *args, **kwargs)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 |
removeAssociation(self, *args, **kwargs)Remove the association for the given server URL and handle, returning whether the association existed at all. (str, str) -> bool |
storeAssociation(self, *args, **kwargs)Set the association for the server URL. Association -> NoneType |
storeNonce(self, *args, **kwargs)Add this nonce to the set of extant nonces, ignoring if it is already present. str -> NoneType |
txn_createTables(self)This method creates the database tables necessary for this store to work. It should not be called if the tables already exist. |
txn_getAssociation(self, server_url, handle=None)Get the most recent association that has been set for this server URL and handle. str -> NoneType or Association |
txn_getAuthKey(self)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 |
txn_removeAssociation(self, server_url, handle)Remove the association for the given server URL and handle, returning whether the association existed at all. (str, str) -> bool |
txn_storeAssociation(self, server_url, association)Set the association for the server URL. Association -> NoneType |
txn_storeNonce(self, nonce)Add this nonce to the set of extant nonces, ignoring if it is already present. str -> NoneType |
txn_useNonce(self, nonce)Return whether this nonce is present, and if it is, then remove it from the set. str -> bool |
useNonce(self, *args, **kwargs)Return whether this nonce is present, and if it is, then remove it from the set. str -> bool
|
| Class Variable Details |
|---|
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.
|
settings_tableThis is the default name of the table to keep this store's settings in.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Fri Dec 14 11:14:09 2007 | http://epydoc.sf.net |