1
<?xml version="1.0" encoding="ascii"?>
1
<?xml version="1.0" encoding="iso-8859-1"?>
2
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
3
"DTD/xhtml1-transitional.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
6
<title>openid.store.sqlstore.SQLiteStore</title>
7
<link rel="stylesheet" href="epydoc.css" type="text/css" />
8
<script type="text/javascript" src="epydoc.js"></script>
7
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
11
9
<body bgcolor="white" text="black" link="blue" vlink="#204080"
13
<!-- ==================== NAVIGATION BAR ==================== -->
14
<table class="navbar" border="0" width="100%" cellpadding="0"
15
bgcolor="#a0c0ff" cellspacing="0">
18
<th> <a
19
href="openid-module.html">Home</a> </th>
22
<th> <a
23
href="module-tree.html">Trees</a> </th>
26
<th> <a
27
href="identifier-index.html">Indices</a> </th>
30
<th> <a
31
href="help.html">Help</a> </th>
33
<!-- Project homepage -->
34
<th class="navbar" align="right" width="100%">
35
<table border="0" cellpadding="0" cellspacing="0">
36
<tr><th class="navbar" align="center"
37
><a class="navbar" target="_top" href="http://www.openidenabled.com/">Python-OpenID</a></th>
12
<!-- =========== START OF NAVBAR =========== -->
13
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
15
<th class="navbar"> <a class="navbar" href="openid-module.html">Home</a> </th>
16
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
17
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
18
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
19
<th class="navbar" align="right" width="100%">
20
<table border="0" cellpadding="0" cellspacing="0">
21
<tr><th class="navbar" align="center">
23
<a class="navbar" target="_top" href="http://www.openidenabled.com/">Python-OpenID</a>
24
</p></th></tr></table>
41
28
<table width="100%" cellpadding="0" cellspacing="0">
44
<span class="breadcrumbs">
31
<font size="-1"><b class="breadcrumbs">
45
32
<a href="openid-module.html">Package openid</a> ::
46
33
<a href="openid.store-module.html">Package store</a> ::
47
34
<a href="openid.store.sqlstore-module.html">Module sqlstore</a> ::
48
35
Class SQLiteStore
52
<table cellpadding="0" cellspacing="0">
53
<!-- hide/show private -->
54
<tr><td align="right"><span class="options"
55
>[<a href="frames.html" target="_top">frames</a
56
>] | <a href="openid.store.sqlstore.SQLiteStore-class.html"
57
target="_top">no frames</a>]</span></td></tr>
62
<!-- ==================== CLASS DESCRIPTION ==================== -->
63
<h1 class="epydoc">Class SQLiteStore</h1><span class="codelink"><a href="openid.store.sqlstore-pysrc.html#SQLiteStore">source code</a></span><br /><br />
38
<td><table cellpadding="0" cellspacing="0">
39
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="openid.store.sqlstore.SQLiteStore-class.html" target="_top">no frames</a>]</font></td></tr>
43
<!-- =========== START OF CLASS DESCRIPTION =========== -->
44
<h2 class="class">Type SQLiteStore</h2>
64
46
<pre class="base-tree">
67
<a href="openid.store.interface.OpenIDStore-class.html">interface.OpenIDStore</a> --+
69
<a href="openid.store.sqlstore.SQLStore-class.html">SQLStore</a> --+
71
<strong class="uidshort">SQLiteStore</strong>
47
<a href="__builtin__.object-class.html"><code>object</code></a> --+
49
<a href="openid.store.interface.OpenIDStore-class.html"><code>OpenIDStore</code></a> --+
51
<a href="openid.store.sqlstore.SQLStore-class.html"><code>SQLStore</code></a> --+
75
58
<p>This is an SQLite-based specialization of <code><a
76
href="openid.store.sqlstore.SQLStore-class.html"
77
class="link">SQLStore</a></code>.</p>
78
<p>To create an instance, see <code><a
79
href="openid.store.sqlstore.SQLStore-class.html#__init__"
80
class="link">SQLStore.__init__</a></code>. To create the tables it will
82
href="openid.store.sqlstore.SQLStore-class.html#createTables"
83
class="link">SQLStore.createTables</a></code>.</p>
84
All other methods are implementation details.<br /><br />
86
<!-- ==================== INSTANCE METHODS ==================== -->
87
<a name="section-InstanceMethods"></a>
88
<table class="summary" border="1" cellpadding="3"
89
cellspacing="0" width="100%" bgcolor="white">
90
<tr bgcolor="#70b0f0" class="table-header">
91
<td colspan="2" class="table-header">
92
<table border="0" cellpadding="0" cellspacing="0" width="100%">
94
<td align="left"><span class="table-header">Instance Methods</span></td>
95
<td align="right" valign="top"
96
><span class="options">[<a href="#section-InstanceMethods"
97
class="privatelink" onclick="toggle_private();"
98
>hide private</a>]</span></td>
104
<td width="15%" align="right" valign="top" class="summary">
105
<span class="summary-type"> </span>
106
</td><td class="summary">
107
<span class="summary-sig"><a href="openid.store.sqlstore.SQLiteStore-class.html#blobDecode" class="summary-sig-name">blobDecode</a>(<span class="summary-sig-arg">self</span>,
108
<span class="summary-sig-arg">buf</span>)</span><br />
109
Convert a blob as returned by the SQL engine into a str
114
<td width="15%" align="right" valign="top" class="summary">
115
<span class="summary-type"> </span>
116
</td><td class="summary">
117
<span class="summary-sig"><a href="openid.store.sqlstore.SQLiteStore-class.html#blobEncode" class="summary-sig-name">blobEncode</a>(<span class="summary-sig-arg">self</span>,
118
<span class="summary-sig-arg">s</span>)</span><br />
119
Convert a str object into the necessary object for storing in the
124
<td colspan="2" class="summary">
125
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="openid.store.sqlstore.SQLStore-class.html">SQLStore</a></code></b>:
126
<code><a href="openid.store.sqlstore.SQLStore-class.html#__getattr__">__getattr__</a></code>,
127
<code><a href="openid.store.sqlstore.SQLStore-class.html#__init__">__init__</a></code>,
128
<code><a href="openid.store.sqlstore.SQLStore-class.html#createTables">createTables</a></code>,
129
<code><a href="openid.store.sqlstore.SQLStore-class.html#getAssociation">getAssociation</a></code>,
130
<code><a href="openid.store.sqlstore.SQLStore-class.html#getAuthKey">getAuthKey</a></code>,
131
<code><a href="openid.store.sqlstore.SQLStore-class.html#removeAssociation">removeAssociation</a></code>,
132
<code><a href="openid.store.sqlstore.SQLStore-class.html#storeAssociation">storeAssociation</a></code>,
133
<code><a href="openid.store.sqlstore.SQLStore-class.html#storeNonce">storeNonce</a></code>,
134
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_createTables">txn_createTables</a></code>,
135
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_getAssociation">txn_getAssociation</a></code>,
136
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_getAuthKey">txn_getAuthKey</a></code>,
137
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_removeAssociation">txn_removeAssociation</a></code>,
138
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_storeAssociation">txn_storeAssociation</a></code>,
139
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_storeNonce">txn_storeNonce</a></code>,
140
<code><a href="openid.store.sqlstore.SQLStore-class.html#txn_useNonce">txn_useNonce</a></code>,
141
<code><a href="openid.store.sqlstore.SQLStore-class.html#useNonce">useNonce</a></code>
143
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="openid.store.interface.OpenIDStore-class.html">interface.OpenIDStore</a></code></b>:
144
<code><a href="openid.store.interface.OpenIDStore-class.html#isDumb">isDumb</a></code>
146
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
147
<code>__delattr__</code>,
148
<code>__getattribute__</code>,
149
<code>__hash__</code>,
150
<code>__new__</code>,
151
<code>__reduce__</code>,
152
<code>__reduce_ex__</code>,
153
<code>__repr__</code>,
154
<code>__setattr__</code>,
162
<!-- ==================== CLASS VARIABLES ==================== -->
163
<a name="section-ClassVariables"></a>
164
<table class="summary" border="1" cellpadding="3"
165
cellspacing="0" width="100%" bgcolor="white">
166
<tr bgcolor="#70b0f0" class="table-header">
167
<td colspan="2" class="table-header">
168
<table border="0" cellpadding="0" cellspacing="0" width="100%">
170
<td align="left"><span class="table-header">Class Variables</span></td>
171
<td align="right" valign="top"
172
><span class="options">[<a href="#section-ClassVariables"
173
class="privatelink" onclick="toggle_private();"
174
>hide private</a>]</span></td>
180
<td width="15%" align="right" valign="top" class="summary">
181
<span class="summary-type"> </span>
182
</td><td class="summary">
183
<a href="openid.store.sqlstore.SQLiteStore-class.html#create_nonce_sql">create_nonce_sql</a> = <code title="'\n CREATE TABLE %(nonces)s\n (\n nonce CHAR(8) UNIQUE PRIMARY KEY,\n expires INTEGER\n );\n '">'\n CREATE TABLE %(nonces)s\n (\n nonce CHAR(8) UNIQ...</code>
187
<td width="15%" align="right" valign="top" class="summary">
188
<span class="summary-type"> </span>
189
</td><td class="summary">
190
<a href="openid.store.sqlstore.SQLiteStore-class.html#create_assoc_sql">create_assoc_sql</a> = <code title="'\n CREATE TABLE %(associations)s\n (\n server_url VARCHAR(2047),\n handle VARCHAR(255),\n secret BLOB(128),\n issued INTEGER,\n lifetime INTEGER,\n assoc_type VARCHAR(64),\n PRIMARY KEY (server_url, handle)\n );\n '">'\n CREATE TABLE %(associations)s\n (\n server_url V...</code>
194
<td width="15%" align="right" valign="top" class="summary">
195
<span class="summary-type"> </span>
196
</td><td class="summary">
197
<a href="openid.store.sqlstore.SQLiteStore-class.html#create_settings_sql">create_settings_sql</a> = <code title="'\n CREATE TABLE %(settings)s\n (\n setting VARCHAR(128) UNIQUE PRIMARY KEY,\n value BLOB(20)\n );\n '">'\n CREATE TABLE %(settings)s\n (\n setting VARCHAR(...</code>
201
<td width="15%" align="right" valign="top" class="summary">
202
<span class="summary-type"> </span>
203
</td><td class="summary">
204
<a href="openid.store.sqlstore.SQLiteStore-class.html#create_auth_sql">create_auth_sql</a> = <code title="'INSERT INTO %(settings)s VALUES ("auth_key", ?);'">'INSERT INTO %(settings)s VALUES ("auth_key", ?);'</code>
208
<td width="15%" align="right" valign="top" class="summary">
209
<span class="summary-type"> </span>
210
</td><td class="summary">
211
<a href="openid.store.sqlstore.SQLiteStore-class.html#get_auth_sql">get_auth_sql</a> = <code title="'SELECT value FROM %(settings)s WHERE setting = "auth_key";'">'SELECT value FROM %(settings)s WHERE setting = "aut...</code>
215
<td width="15%" align="right" valign="top" class="summary">
216
<span class="summary-type"> </span>
217
</td><td class="summary">
218
<a href="openid.store.sqlstore.SQLiteStore-class.html#set_assoc_sql">set_assoc_sql</a> = <code title="'INSERT OR REPLACE INTO %(associations)s VALUES (?, ?, ?, ?, ?, ?);'">'INSERT OR REPLACE INTO %(associations)s VALUES (?, ...</code>
222
<td width="15%" align="right" valign="top" class="summary">
223
<span class="summary-type"> </span>
224
</td><td class="summary">
225
<a href="openid.store.sqlstore.SQLiteStore-class.html#get_assocs_sql">get_assocs_sql</a> = <code title="'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associations)s WHERE server_url = ?;'">'SELECT handle, secret, issued, lifetime, assoc_type...</code>
229
<td width="15%" align="right" valign="top" class="summary">
230
<span class="summary-type"> </span>
231
</td><td class="summary">
232
<a href="openid.store.sqlstore.SQLiteStore-class.html#get_assoc_sql">get_assoc_sql</a> = <code title="'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associations)s WHERE server_url = ? AND handle = ?;'">'SELECT handle, secret, issued, lifetime, assoc_type...</code>
236
<td width="15%" align="right" valign="top" class="summary">
237
<span class="summary-type"> </span>
238
</td><td class="summary">
239
<a href="openid.store.sqlstore.SQLiteStore-class.html#remove_assoc_sql">remove_assoc_sql</a> = <code title="'DELETE FROM %(associations)s WHERE server_url = ? AND handle = ?;'">'DELETE FROM %(associations)s WHERE server_url = ? A...</code>
243
<td width="15%" align="right" valign="top" class="summary">
244
<span class="summary-type"> </span>
245
</td><td class="summary">
246
<a href="openid.store.sqlstore.SQLiteStore-class.html#add_nonce_sql">add_nonce_sql</a> = <code title="'INSERT OR REPLACE INTO %(nonces)s VALUES (?, ?);'">'INSERT OR REPLACE INTO %(nonces)s VALUES (?, ?);'</code>
250
<td width="15%" align="right" valign="top" class="summary">
251
<span class="summary-type"> </span>
252
</td><td class="summary">
253
<a href="openid.store.sqlstore.SQLiteStore-class.html#get_nonce_sql">get_nonce_sql</a> = <code title="'SELECT * FROM %(nonces)s WHERE nonce = ?;'">'SELECT * FROM %(nonces)s WHERE nonce = ?;'</code>
257
<td width="15%" align="right" valign="top" class="summary">
258
<span class="summary-type"> </span>
259
</td><td class="summary">
260
<a href="openid.store.sqlstore.SQLiteStore-class.html#remove_nonce_sql">remove_nonce_sql</a> = <code title="'DELETE FROM %(nonces)s WHERE nonce = ?;'">'DELETE FROM %(nonces)s WHERE nonce = ?;'</code>
264
<td colspan="2" class="summary">
265
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="openid.store.sqlstore.SQLStore-class.html">SQLStore</a></code></b>:
266
<code><a href="openid.store.sqlstore.SQLStore-class.html#associations_table">associations_table</a></code>,
267
<code><a href="openid.store.sqlstore.SQLStore-class.html#nonces_table">nonces_table</a></code>,
268
<code><a href="openid.store.sqlstore.SQLStore-class.html#settings_table">settings_table</a></code>
270
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="openid.store.interface.OpenIDStore-class.html">interface.OpenIDStore</a></code></b>:
271
<code><a href="openid.store.interface.OpenIDStore-class.html#AUTH_KEY_LEN">AUTH_KEY_LEN</a></code>
278
<!-- ==================== PROPERTIES ==================== -->
279
<a name="section-Properties"></a>
280
<table class="summary" border="1" cellpadding="3"
281
cellspacing="0" width="100%" bgcolor="white">
282
<tr bgcolor="#70b0f0" class="table-header">
283
<td colspan="2" class="table-header">
284
<table border="0" cellpadding="0" cellspacing="0" width="100%">
286
<td align="left"><span class="table-header">Properties</span></td>
287
<td align="right" valign="top"
288
><span class="options">[<a href="#section-Properties"
289
class="privatelink" onclick="toggle_private();"
290
>hide private</a>]</span></td>
296
<td colspan="2" class="summary">
297
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
298
<code>__class__</code>
305
<!-- ==================== METHOD DETAILS ==================== -->
306
<a name="section-MethodDetails"></a>
307
<table class="summary" border="1" cellpadding="3"
308
cellspacing="0" width="100%" bgcolor="white">
309
<tr bgcolor="#70b0f0" class="table-header">
310
<td colspan="2" class="table-header">
311
<table border="0" cellpadding="0" cellspacing="0" width="100%">
313
<td align="left"><span class="table-header">Method Details</span></td>
314
<td align="right" valign="top"
315
><span class="options">[<a href="#section-MethodDetails"
316
class="privatelink" onclick="toggle_private();"
317
>hide private</a>]</span></td>
323
<a name="blobDecode"></a>
325
<table class="details" border="1" cellpadding="3"
326
cellspacing="0" width="100%" bgcolor="white">
328
<table width="100%" cellpadding="0" cellspacing="0" border="0">
329
<tr valign="top"><td>
330
<h3 class="epydoc"><span class="sig"><span class="sig-name">blobDecode</span>(<span class="sig-arg">self</span>,
331
<span class="sig-arg">buf</span>)</span>
333
</td><td align="right" valign="top"
334
><span class="codelink"><a href="openid.store.sqlstore-pysrc.html#SQLiteStore.blobDecode">source code</a></span>
338
<br /><p>Convert a blob as returned by the SQL engine into a str object.</p>
342
<a href="openid.store.sqlstore.SQLStore-class.html#blobDecode">SQLStore.blobDecode</a>
343
<dd><em class="note">(inherited documentation)</em></dd>
59
href="openid.store.sqlstore.SQLStore-class.html"
60
class="link"><code>SQLStore</code></a></code>.</p>
61
<p>To create an instance, see <code><a
62
href="openid.store.sqlstore.SQLStore-class.html#__init__"
63
class="link"><code>SQLStore.__init__</code></a></code>. To create the
64
tables it will use, see <code><a
65
href="openid.store.sqlstore.SQLStore-class.html#createTables"
66
class="link"><code>SQLStore.createTables</code></a></code>.</p>
67
All other methods are implementation details.
71
<!-- =========== START OF METHOD SUMMARY =========== -->
72
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
73
<tr bgcolor="#70b0f0" class="summary">
74
<th colspan="2">Method Summary</th></tr>
75
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
76
<td><code><a name="blobDecode"></a><span class="summary-sig"><span class="summary-sig-name">blobDecode</span>(<span class=summary-sig-arg>self</span>,
77
<span class=summary-sig-arg>buf</span>)</span></code>
79
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
80
<td><code><span class="summary-sig"><a href="openid.store.sqlstore.SQLiteStore-class.html#blobEncode" class="summary-sig-name"><code>blobEncode</code></a>(<span class=summary-sig-arg>self</span>,
81
<span class=summary-sig-arg>s</span>)</span></code>
83
Convert a str object into the necessary object for storing in the
84
database as a blob.</td></tr>
85
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
86
<td><code><span class="summary-sig"><a href="openid.store.sqlstore.SQLiteStore-class.html#useNonce" class="summary-sig-name"><code>useNonce</code></a>(<span class=summary-sig-arg>self</span>,
87
<span class="summary-sig-vararg">*args</span>,
88
<span class="summary-sig-kwarg">**kwargs</span>)</span></code>
90
Return whether this nonce is present, and if it is, then remove it
91
from the set.</td></tr>
93
<b>Inherited from <a href="openid.store.sqlstore.SQLStore-class.html"><code>SQLStore</code></a>:</b>
94
<a href="openid.store.sqlstore.SQLStore-class.html#__init__"><code>__init__</code></a>,
95
<a href="openid.store.sqlstore.SQLStore-class.html#__getattr__"><code>__getattr__</code></a>,
96
<a href="openid.store.sqlstore.SQLStore-class.html#cleanupAssociations"><code>cleanupAssociations</code></a>,
97
<a href="openid.store.sqlstore.SQLStore-class.html#cleanupNonces"><code>cleanupNonces</code></a>,
98
<a href="openid.store.sqlstore.SQLStore-class.html#createTables"><code>createTables</code></a>,
99
<a href="openid.store.sqlstore.SQLStore-class.html#getAssociation"><code>getAssociation</code></a>,
100
<a href="openid.store.sqlstore.SQLStore-class.html#removeAssociation"><code>removeAssociation</code></a>,
101
<a href="openid.store.sqlstore.SQLStore-class.html#storeAssociation"><code>storeAssociation</code></a>,
102
<a href="openid.store.sqlstore.SQLStore-class.html#txn_cleanupAssociations"><code>txn_cleanupAssociations</code></a>,
103
<a href="openid.store.sqlstore.SQLStore-class.html#txn_cleanupNonces"><code>txn_cleanupNonces</code></a>,
104
<a href="openid.store.sqlstore.SQLStore-class.html#txn_createTables"><code>txn_createTables</code></a>,
105
<a href="openid.store.sqlstore.SQLStore-class.html#txn_getAssociation"><code>txn_getAssociation</code></a>,
106
<a href="openid.store.sqlstore.SQLStore-class.html#txn_removeAssociation"><code>txn_removeAssociation</code></a>,
107
<a href="openid.store.sqlstore.SQLStore-class.html#txn_storeAssociation"><code>txn_storeAssociation</code></a>,
108
<a href="openid.store.sqlstore.SQLStore-class.html#txn_useNonce"><code>txn_useNonce</code></a>
110
<b>Inherited from <a href="openid.store.interface.OpenIDStore-class.html"><code>OpenIDStore</code></a>:</b>
111
<a href="openid.store.interface.OpenIDStore-class.html#cleanup"><code>cleanup</code></a>
113
<b>Inherited from <a href="__builtin__.object-class.html"><code>object</code></a>:</b>
114
<a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a>,
115
<a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a>,
116
<a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a>,
117
<a href="__builtin__.object-class.html#__new__"><code>__new__</code></a>,
118
<a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a>,
119
<a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a>,
120
<a href="__builtin__.object-class.html#__repr__"><code>__repr__</code></a>,
121
<a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a>,
122
<a href="__builtin__.object-class.html#__str__"><code>__str__</code></a>
127
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
128
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
129
<tr bgcolor="#70b0f0" class="summary">
130
<th colspan="2">Class Variable Summary</th></tr>
131
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
132
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#add_nonce_sql"><code>add_nonce_sql</code></a></b> = <span title="'INSERT INTO %(nonces)s VALUES (?, ?, ?);'"><code><span class="variable-quote">'</span>INSERT INTO %(nonces)s VALUES (?, ?, ?)<span class="variable-ellipsis">...</span></code>
134
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
135
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#clean_assoc_sql"><code>clean_assoc_sql</code></a></b> = <span title="'DELETE FROM %(associations)s WHERE issued + lifetime < ?;'"><code><span class="variable-quote">'</span>DELETE FROM %(associations)s WHERE is<span class="variable-ellipsis">...</span></code>
137
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
138
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#clean_nonce_sql"><code>clean_nonce_sql</code></a></b> = <span title="'DELETE FROM %(nonces)s WHERE timestamp < ?;'"><code><span class="variable-quote">'</span>DELETE FROM %(nonces)s WHERE timestam<span class="variable-ellipsis">...</span></code>
140
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
141
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#create_assoc_sql"><code>create_assoc_sql</code></a></b> = <span title="'\n CREATE TABLE %(associations)s\n (\n server_url VARCHAR(2047),\n handle VARCHAR(255),\n secret BLOB(128),\n issued INTEGER,\n lifetime INTEGER,\n assoc_type VARCHAR(64),\n PRIMARY KEY (server_url, handle)\n );\n '"><code><span class="variable-quote">'</span>\n CREATE TABLE %(associations)s\<span class="variable-ellipsis">...</span></code>
143
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
144
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#create_nonce_sql"><code>create_nonce_sql</code></a></b> = <span title="'\n CREATE TABLE %(nonces)s (\n server_url VARCHAR,\n timestamp INTEGER,\n salt CHAR(40),\n UNIQUE(server_url, timestamp, salt)\n );\n '"><code><span class="variable-quote">'</span>\n CREATE TABLE %(nonces)s (\n <span class="variable-ellipsis">...</span></code>
146
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
147
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#create_settings_sql"><code>create_settings_sql</code></a></b> = <span title="'\n CREATE TABLE %(settings)s\n (\n setting VARCHAR(128) UNIQUE PRIMARY KEY,\n value BLOB(20)\n );\n '"><code><span class="variable-quote">'</span>\n CREATE TABLE %(settings)s\n<span class="variable-ellipsis">...</span></code>
149
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
150
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#get_assoc_sql"><code>get_assoc_sql</code></a></b> = <span title="'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associations)s WHERE server_url = ? AND handle = ?;'"><code><span class="variable-quote">'</span>SELECT handle, secret, issued, lifetime<span class="variable-ellipsis">...</span></code>
152
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
153
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#get_assocs_sql"><code>get_assocs_sql</code></a></b> = <span title="'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associations)s WHERE server_url = ?;'"><code><span class="variable-quote">'</span>SELECT handle, secret, issued, lifetim<span class="variable-ellipsis">...</span></code>
155
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
156
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#get_expired_sql"><code>get_expired_sql</code></a></b> = <span title="'SELECT server_url FROM %(associations)s WHERE issued + lifetime < ?;'"><code><span class="variable-quote">'</span>SELECT server_url FROM %(associations<span class="variable-ellipsis">...</span></code>
158
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
159
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#remove_assoc_sql"><code>remove_assoc_sql</code></a></b> = <span title="'DELETE FROM %(associations)s WHERE server_url = ? AND handle = ?;'"><code><span class="variable-quote">'</span>DELETE FROM %(associations)s WHERE s<span class="variable-ellipsis">...</span></code>
161
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
162
<td><b><a href="openid.store.sqlstore.SQLiteStore-class.html#set_assoc_sql"><code>set_assoc_sql</code></a></b> = <span title="'INSERT OR REPLACE INTO %(associations)s VALUES (?, ?, ?, ?, ?, ?);'"><code><span class="variable-quote">'</span>INSERT OR REPLACE INTO %(associations)s<span class="variable-ellipsis">...</span></code>
165
<b>Inherited from <a href="openid.store.sqlstore.SQLStore-class.html"><code>SQLStore</code></a>:</b>
166
<a href="openid.store.sqlstore.SQLStore-class.html#associations_table"><code>associations_table</code></a>,
167
<a href="openid.store.sqlstore.SQLStore-class.html#nonces_table"><code>nonces_table</code></a>,
168
<a href="openid.store.sqlstore.SQLStore-class.html#settings_table"><code>settings_table</code></a>
173
<!-- =========== START OF METHOD DETAILS =========== -->
174
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
175
<tr bgcolor="#70b0f0" class="details">
176
<th colspan="2">Method Details</th></tr>
348
179
<a name="blobEncode"></a>
350
<table class="details" border="1" cellpadding="3"
351
cellspacing="0" width="100%" bgcolor="white">
353
<table width="100%" cellpadding="0" cellspacing="0" border="0">
354
<tr valign="top"><td>
355
<h3 class="epydoc"><span class="sig"><span class="sig-name">blobEncode</span>(<span class="sig-arg">self</span>,
356
<span class="sig-arg">s</span>)</span>
180
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
181
<h3><span class="sig"><span class="sig-name">blobEncode</span>(<span class=sig-arg>self</span>,
182
<span class=sig-arg>s</span>)</span>
358
</td><td align="right" valign="top"
359
><span class="codelink"><a href="openid.store.sqlstore-pysrc.html#SQLiteStore.blobEncode">source code</a></span>
363
<br />Convert a str object into the necessary object for storing in the
184
Convert a str object into the necessary object for storing in the
364
185
database as a blob.
365
186
<dl><dt></dt><dd>
367
<a href="openid.store.sqlstore.SQLStore-class.html#blobEncode">SQLStore.blobEncode</a>
368
<dd><em class="note">(inherited documentation)</em></dd>
187
<dl><dt><b>Overrides:</b></dt>
188
<dd><a href="openid.store.sqlstore.SQLStore-class.html#blobEncode"><code>openid.store.sqlstore.SQLStore.blobEncode</code></a> <i>(inherited documentation)</i>
194
<a name="useNonce"></a>
195
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
196
<h3><span class="sig"><span class="sig-name">useNonce</span>(<span class=sig-arg>self</span>,
197
<span class="sig-vararg">*args</span>,
198
<span class="sig-kwarg">**kwargs</span>)</span>
200
<p>Return whether this nonce is present, and if it is, then remove it
204
<dl><dt><b>Overrides:</b></dt>
205
<dd><a href="openid.store.sqlstore.SQLStore-class.html#useNonce"><code>openid.store.sqlstore.SQLStore.useNonce</code></a> <i>(inherited documentation)</i>
374
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
375
<a name="section-ClassVariableDetails"></a>
376
<table class="summary" border="1" cellpadding="3"
377
cellspacing="0" width="100%" bgcolor="white">
378
<tr bgcolor="#70b0f0" class="table-header">
379
<td colspan="2" class="table-header">
380
<table border="0" cellpadding="0" cellspacing="0" width="100%">
382
<td align="left"><span class="table-header">Class Variable Details</span></td>
383
<td align="right" valign="top"
384
><span class="options">[<a href="#section-ClassVariableDetails"
385
class="privatelink" onclick="toggle_private();"
386
>hide private</a>]</span></td>
213
<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
214
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
215
<tr bgcolor="#70b0f0" class="details">
216
<th colspan="2">Class Variable Details</th></tr>
392
<a name="create_nonce_sql"></a>
394
<table class="details" border="1" cellpadding="3"
395
cellspacing="0" width="100%" bgcolor="white">
397
<h3 class="epydoc">create_nonce_sql</h3>
401
<dd><table><tr><td><pre class="variable">
402
<span class="variable-quote">'''</span>
403
CREATE TABLE %(nonces)s
405
nonce CHAR(8) UNIQUE PRIMARY KEY,
408
<span class="variable-quote">'''</span>
409
</pre></td></tr></table></dd>
218
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
219
<a name="add_nonce_sql"></a>
220
<h3>add_nonce_sql</h3>
225
<dt><b>Type:</b></dt>
230
<span title="'INSERT INTO %(nonces)s VALUES (?, ?, ?);'"> <dt><b>Value:</b></dt>
232
<pre class="variable">
233
<span class="variable-quote">'</span>INSERT INTO %(nonces)s VALUES (?, ?, ?);<span class="variable-quote">'</span> </pre>
234
</td></tr></table></dd>
237
</dl></td></tr></table>
238
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
239
<a name="clean_assoc_sql"></a>
240
<h3>clean_assoc_sql</h3>
245
<dt><b>Type:</b></dt>
250
<span title="'DELETE FROM %(associations)s WHERE issued + lifetime < ?;'"> <dt><b>Value:</b></dt>
252
<pre class="variable">
253
<span class="variable-quote">'</span>DELETE FROM %(associations)s WHERE issued + lifetime < ?;<span class="variable-quote">'</span> </pre>
254
</td></tr></table></dd>
257
</dl></td></tr></table>
258
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
259
<a name="clean_nonce_sql"></a>
260
<h3>clean_nonce_sql</h3>
265
<dt><b>Type:</b></dt>
270
<span title="'DELETE FROM %(nonces)s WHERE timestamp < ?;'"> <dt><b>Value:</b></dt>
272
<pre class="variable">
273
<span class="variable-quote">'</span>DELETE FROM %(nonces)s WHERE timestamp < ?;<span class="variable-quote">'</span> </pre>
274
</td></tr></table></dd>
277
</dl></td></tr></table>
278
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
414
279
<a name="create_assoc_sql"></a>
416
<table class="details" border="1" cellpadding="3"
417
cellspacing="0" width="100%" bgcolor="white">
419
<h3 class="epydoc">create_assoc_sql</h3>
423
<dd><table><tr><td><pre class="variable">
280
<h3>create_assoc_sql</h3>
285
<dt><b>Type:</b></dt>
290
<span title="'\n CREATE TABLE %(associations)s\n (\n server_url VARCHAR(2047),\n handle VARCHAR(255),\n secret BLOB(128),\n issued INTEGER,\n lifetime INTEGER,\n assoc_type VARCHAR(64),\n PRIMARY KEY (server_url, handle)\n );\n '"> <dt><b>Value:</b></dt>
292
<pre class="variable">
424
293
<span class="variable-quote">'''</span>
425
294
CREATE TABLE %(associations)s
429
298
secret BLOB(128),
431
300
lifetime INTEGER,
432
<span class="variable-ellipsis">...</span>
433
</pre></td></tr></table></dd>
301
<span class="variable-ellipsis">...</span> </pre>
302
</td></tr></table></dd>
305
</dl></td></tr></table>
306
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
307
<a name="create_nonce_sql"></a>
308
<h3>create_nonce_sql</h3>
313
<dt><b>Type:</b></dt>
318
<span title="'\n CREATE TABLE %(nonces)s (\n server_url VARCHAR,\n timestamp INTEGER,\n salt CHAR(40),\n UNIQUE(server_url, timestamp, salt)\n );\n '"> <dt><b>Value:</b></dt>
320
<pre class="variable">
321
<span class="variable-quote">'''</span>
322
CREATE TABLE %(nonces)s (
326
UNIQUE(server_url, timestamp, salt)
328
<span class="variable-quote">'''</span> </pre>
329
</td></tr></table></dd>
332
</dl></td></tr></table>
333
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
438
334
<a name="create_settings_sql"></a>
440
<table class="details" border="1" cellpadding="3"
441
cellspacing="0" width="100%" bgcolor="white">
443
<h3 class="epydoc">create_settings_sql</h3>
447
<dd><table><tr><td><pre class="variable">
335
<h3>create_settings_sql</h3>
340
<dt><b>Type:</b></dt>
345
<span title="'\n CREATE TABLE %(settings)s\n (\n setting VARCHAR(128) UNIQUE PRIMARY KEY,\n value BLOB(20)\n );\n '"> <dt><b>Value:</b></dt>
347
<pre class="variable">
448
348
<span class="variable-quote">'''</span>
449
349
CREATE TABLE %(settings)s
451
351
setting VARCHAR(128) UNIQUE PRIMARY KEY,
454
<span class="variable-quote">'''</span>
455
</pre></td></tr></table></dd>
460
<a name="create_auth_sql"></a>
462
<table class="details" border="1" cellpadding="3"
463
cellspacing="0" width="100%" bgcolor="white">
465
<h3 class="epydoc">create_auth_sql</h3>
469
<dd><table><tr><td><pre class="variable">
470
<span class="variable-quote">'</span>INSERT INTO %(settings)s VALUES ("auth_key", ?);<span class="variable-quote">'</span>
471
</pre></td></tr></table></dd>
476
<a name="get_auth_sql"></a>
478
<table class="details" border="1" cellpadding="3"
479
cellspacing="0" width="100%" bgcolor="white">
481
<h3 class="epydoc">get_auth_sql</h3>
485
<dd><table><tr><td><pre class="variable">
486
<span class="variable-quote">'</span>SELECT value FROM %(settings)s WHERE setting = "auth_key";<span class="variable-quote">'</span>
487
</pre></td></tr></table></dd>
492
<a name="set_assoc_sql"></a>
494
<table class="details" border="1" cellpadding="3"
495
cellspacing="0" width="100%" bgcolor="white">
497
<h3 class="epydoc">set_assoc_sql</h3>
501
<dd><table><tr><td><pre class="variable">
502
<span class="variable-quote">'</span>INSERT OR REPLACE INTO %(associations)s VALUES (?, ?, ?, ?, ?, ?);<span class="variable-quote">'</span>
503
</pre></td></tr></table></dd>
354
<span class="variable-quote">'''</span> </pre>
355
</td></tr></table></dd>
358
</dl></td></tr></table>
359
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
360
<a name="get_assoc_sql"></a>
361
<h3>get_assoc_sql</h3>
366
<dt><b>Type:</b></dt>
371
<span title="'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associations)s WHERE server_url = ? AND handle = ?;'"> <dt><b>Value:</b></dt>
373
<pre class="variable">
374
<span class="variable-quote">'</span>SELECT handle, secret, issued, lifetime, assoc_type FROM %(associatio<span class="variable-linewrap">\</span>
375
ns)s WHERE server_url = ? AND handle = ?;<span class="variable-quote">'</span> </pre>
376
</td></tr></table></dd>
379
</dl></td></tr></table>
380
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
508
381
<a name="get_assocs_sql"></a>
510
<table class="details" border="1" cellpadding="3"
511
cellspacing="0" width="100%" bgcolor="white">
513
<h3 class="epydoc">get_assocs_sql</h3>
517
<dd><table><tr><td><pre class="variable">
518
<span class="variable-quote">'</span>SELECT handle, secret, issued, lifetime, assoc_type FROM %(associatio<span class="variable-linewrap"><img src="crarr.png" alt="" /></span>
519
ns)s WHERE server_url = ?;<span class="variable-quote">'</span>
520
</pre></td></tr></table></dd>
525
<a name="get_assoc_sql"></a>
527
<table class="details" border="1" cellpadding="3"
528
cellspacing="0" width="100%" bgcolor="white">
530
<h3 class="epydoc">get_assoc_sql</h3>
534
<dd><table><tr><td><pre class="variable">
535
<span class="variable-quote">'</span>SELECT handle, secret, issued, lifetime, assoc_type FROM %(associatio<span class="variable-linewrap"><img src="crarr.png" alt="" /></span>
536
ns)s WHERE server_url = ? AND handle = ?;<span class="variable-quote">'</span>
537
</pre></td></tr></table></dd>
382
<h3>get_assocs_sql</h3>
387
<dt><b>Type:</b></dt>
392
<span title="'SELECT handle, secret, issued, lifetime, assoc_type FROM %(associations)s WHERE server_url = ?;'"> <dt><b>Value:</b></dt>
394
<pre class="variable">
395
<span class="variable-quote">'</span>SELECT handle, secret, issued, lifetime, assoc_type FROM %(associatio<span class="variable-linewrap">\</span>
396
ns)s WHERE server_url = ?;<span class="variable-quote">'</span> </pre>
397
</td></tr></table></dd>
400
</dl></td></tr></table>
401
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
402
<a name="get_expired_sql"></a>
403
<h3>get_expired_sql</h3>
408
<dt><b>Type:</b></dt>
413
<span title="'SELECT server_url FROM %(associations)s WHERE issued + lifetime < ?;'"> <dt><b>Value:</b></dt>
415
<pre class="variable">
416
<span class="variable-quote">'</span>SELECT server_url FROM %(associations)s WHERE issued + lifetime < ?;<span class="variable-quote">'<span class="variable-linewrap">\</span>
418
</td></tr></table></dd>
421
</dl></td></tr></table>
422
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
542
423
<a name="remove_assoc_sql"></a>
544
<table class="details" border="1" cellpadding="3"
545
cellspacing="0" width="100%" bgcolor="white">
547
<h3 class="epydoc">remove_assoc_sql</h3>
551
<dd><table><tr><td><pre class="variable">
552
<span class="variable-quote">'</span>DELETE FROM %(associations)s WHERE server_url = ? AND handle = ?;<span class="variable-quote">'</span>
553
</pre></td></tr></table></dd>
558
<a name="add_nonce_sql"></a>
560
<table class="details" border="1" cellpadding="3"
561
cellspacing="0" width="100%" bgcolor="white">
563
<h3 class="epydoc">add_nonce_sql</h3>
567
<dd><table><tr><td><pre class="variable">
568
<span class="variable-quote">'</span>INSERT OR REPLACE INTO %(nonces)s VALUES (?, ?);<span class="variable-quote">'</span>
569
</pre></td></tr></table></dd>
574
<a name="get_nonce_sql"></a>
576
<table class="details" border="1" cellpadding="3"
577
cellspacing="0" width="100%" bgcolor="white">
579
<h3 class="epydoc">get_nonce_sql</h3>
583
<dd><table><tr><td><pre class="variable">
584
<span class="variable-quote">'</span>SELECT * FROM %(nonces)s WHERE nonce = ?;<span class="variable-quote">'</span>
585
</pre></td></tr></table></dd>
590
<a name="remove_nonce_sql"></a>
592
<table class="details" border="1" cellpadding="3"
593
cellspacing="0" width="100%" bgcolor="white">
595
<h3 class="epydoc">remove_nonce_sql</h3>
599
<dd><table><tr><td><pre class="variable">
600
<span class="variable-quote">'</span>DELETE FROM %(nonces)s WHERE nonce = ?;<span class="variable-quote">'</span>
601
</pre></td></tr></table></dd>
424
<h3>remove_assoc_sql</h3>
429
<dt><b>Type:</b></dt>
434
<span title="'DELETE FROM %(associations)s WHERE server_url = ? AND handle = ?;'"> <dt><b>Value:</b></dt>
436
<pre class="variable">
437
<span class="variable-quote">'</span>DELETE FROM %(associations)s WHERE server_url = ? AND handle = ?;<span class="variable-quote">'</span> </pre>
438
</td></tr></table></dd>
441
</dl></td></tr></table>
442
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
443
<a name="set_assoc_sql"></a>
444
<h3>set_assoc_sql</h3>
449
<dt><b>Type:</b></dt>
454
<span title="'INSERT OR REPLACE INTO %(associations)s VALUES (?, ?, ?, ?, ?, ?);'"> <dt><b>Value:</b></dt>
456
<pre class="variable">
457
<span class="variable-quote">'</span>INSERT OR REPLACE INTO %(associations)s VALUES (?, ?, ?, ?, ?, ?);<span class="variable-quote">'</span> </pre>
458
</td></tr></table></dd>
461
</dl></td></tr></table>
607
<!-- ==================== NAVIGATION BAR ==================== -->
608
<table class="navbar" border="0" width="100%" cellpadding="0"
609
bgcolor="#a0c0ff" cellspacing="0">
612
<th> <a
613
href="openid-module.html">Home</a> </th>
616
<th> <a
617
href="module-tree.html">Trees</a> </th>
620
<th> <a
621
href="identifier-index.html">Indices</a> </th>
624
<th> <a
625
href="help.html">Help</a> </th>
627
<!-- Project homepage -->
628
<th class="navbar" align="right" width="100%">
629
<table border="0" cellpadding="0" cellspacing="0">
630
<tr><th class="navbar" align="center"
631
><a class="navbar" target="_top" href="http://www.openidenabled.com/">Python-OpenID</a></th>
465
<!-- =========== START OF NAVBAR =========== -->
466
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
468
<th class="navbar"> <a class="navbar" href="openid-module.html">Home</a> </th>
469
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
470
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
471
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
472
<th class="navbar" align="right" width="100%">
473
<table border="0" cellpadding="0" cellspacing="0">
474
<tr><th class="navbar" align="center">
476
<a class="navbar" target="_top" href="http://www.openidenabled.com/">Python-OpenID</a>
477
</p></th></tr></table>
635
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
482
<table border="0" cellpadding="0" cellspacing="0" width="100%">
637
<td align="left" class="footer">Generated by Epydoc
638
3.0alpha3 on Fri Dec 8 13:26:20 2006</td>
639
<td align="right" class="footer">
640
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
484
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Mon Sep 10 13:00:12 2007</font></td>
485
<td align="right"><a href="http://epydoc.sourceforge.net"
486
><font size="-2">http://epydoc.sf.net</font></a></td>
645
<script type="text/javascript">
647
// Private objects are initially displayed (because if
648
// javascript is turned off then we want them to be
649
// visible); but by default, we want to hide them. So hide
650
// them unless we have a cookie that says to show them.