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.association.Association</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.association-module.html">Module association</a> ::
47
34
Class Association
51
<table cellpadding="0" cellspacing="0">
52
<!-- hide/show private -->
53
<tr><td align="right"><span class="options"
54
>[<a href="frames.html" target="_top">frames</a
55
>] | <a href="openid.association.Association-class.html"
56
target="_top">no frames</a>]</span></td></tr>
61
<!-- ==================== CLASS DESCRIPTION ==================== -->
62
<h1 class="epydoc">Class Association</h1><span class="codelink"><a href="openid.association-pysrc.html#Association">source code</a></span><br /><br />
37
<td><table cellpadding="0" cellspacing="0">
38
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="openid.association.Association-class.html" target="_top">no frames</a>]</font></td></tr>
42
<!-- =========== START OF CLASS DESCRIPTION =========== -->
43
<h2 class="class">Type Association</h2>
63
45
<pre class="base-tree">
46
<a href="__builtin__.object-class.html"><code>object</code></a> --+
66
<strong class="uidshort">Association</strong>
70
<p>This class represents an association between a server and a consumer.
71
In general, users of this library will never see instances of this
72
object. The only exception is if you implement a custom <code><a
73
href="openid.store.interface.OpenIDStore-class.html"
74
class="link">OpenIDStore</a></code>.</p>
75
If you do implement such a store, it will need to store the values of
76
the <code><a href="openid.association.Association-class.html#handle"
77
class="link">handle</a></code>, <code><a
78
href="openid.association.Association-class.html#secret"
79
class="link">secret</a></code>, <code><a
80
href="openid.association.Association-class.html#issued"
81
class="link">issued</a></code>, <code><a
82
href="openid.association.Association-class.html#lifetime"
83
class="link">lifetime</a></code>, and <code><a
84
href="openid.association.Association-class.html#assoc_type"
85
class="link">assoc_type</a></code> instance variables.<br /><br />
87
<!-- ==================== INSTANCE METHODS ==================== -->
88
<a name="section-InstanceMethods"></a>
89
<table class="summary" border="1" cellpadding="3"
90
cellspacing="0" width="100%" bgcolor="white">
91
<tr bgcolor="#70b0f0" class="table-header">
92
<td colspan="2" class="table-header">
93
<table border="0" cellpadding="0" cellspacing="0" width="100%">
95
<td align="left"><span class="table-header">Instance Methods</span></td>
96
<td align="right" valign="top"
97
><span class="options">[<a href="#section-InstanceMethods"
98
class="privatelink" onclick="toggle_private();"
99
>hide private</a>]</span></td>
105
<td width="15%" align="right" valign="top" class="summary">
106
<span class="summary-type"> </span>
107
</td><td class="summary">
108
<span class="summary-sig"><a href="openid.association.Association-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
109
<span class="summary-sig-arg">handle</span>,
110
<span class="summary-sig-arg">secret</span>,
111
<span class="summary-sig-arg">issued</span>,
112
<span class="summary-sig-arg">lifetime</span>,
113
<span class="summary-sig-arg">assoc_type</span>)</span><br />
114
This is the standard constructor for creating an association.
118
<td width="15%" align="right" valign="top" class="summary">
119
<span class="summary-type"><code>int</code></span>
120
</td><td class="summary">
121
<span class="summary-sig"><a href="openid.association.Association-class.html#getExpiresIn" class="summary-sig-name">getExpiresIn</a>(<span class="summary-sig-arg">self</span>,
122
<span class="summary-sig-arg">now</span>=<span class="summary-sig-default">None</span>)</span><br />
123
This returns the number of seconds this association is still valid
124
for, or <code>0</code> if the association is no longer valid.
128
<td width="15%" align="right" valign="top" class="summary">
129
<span class="summary-type"><code>bool</code></span>
130
</td><td class="summary">
131
<span class="summary-sig"><a href="openid.association.Association-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">self</span>,
132
<span class="summary-sig-arg">other</span>)</span><br />
133
This checks to see if two <code><a
134
href="openid.association.Association-class.html"
135
class="link">Association</a></code> instances represent the same
140
<td width="15%" align="right" valign="top" class="summary">
141
<span class="summary-type"><code>bool</code></span>
142
</td><td class="summary">
143
<span class="summary-sig"><a href="openid.association.Association-class.html#__ne__" class="summary-sig-name">__ne__</a>(<span class="summary-sig-arg">self</span>,
144
<span class="summary-sig-arg">other</span>)</span><br />
145
This checks to see if two <code><a
146
href="openid.association.Association-class.html"
147
class="link">Association</a></code> instances represent different
152
<td width="15%" align="right" valign="top" class="summary">
153
<span class="summary-type">str</span>
154
</td><td class="summary">
155
<span class="summary-sig"><a href="openid.association.Association-class.html#serialize" class="summary-sig-name">serialize</a>(<span class="summary-sig-arg">self</span>)</span><br />
156
Convert an association to KV form.
160
<td width="15%" align="right" valign="top" class="summary">
161
<span class="summary-type">str</span>
162
</td><td class="summary">
163
<span class="summary-sig"><a href="openid.association.Association-class.html#sign" class="summary-sig-name">sign</a>(<span class="summary-sig-arg">self</span>,
164
<span class="summary-sig-arg">pairs</span>)</span><br />
165
Generate a signature for a sequence of (key, value) pairs
169
<td width="15%" align="right" valign="top" class="summary">
170
<span class="summary-type">str</span>
171
</td><td class="summary">
172
<span class="summary-sig"><a href="openid.association.Association-class.html#signDict" class="summary-sig-name">signDict</a>(<span class="summary-sig-arg">self</span>,
173
<span class="summary-sig-arg">fields</span>,
174
<span class="summary-sig-arg">data</span>,
175
<span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default">'openid.'</span>)</span><br />
176
Generate a signature for some fields in a dictionary
180
<td width="15%" align="right" valign="top" class="summary">
181
<span class="summary-type"> </span>
182
</td><td class="summary">
183
<span class="summary-sig"><a href="openid.association.Association-class.html#addSignature" class="summary-sig-name">addSignature</a>(<span class="summary-sig-arg">self</span>,
184
<span class="summary-sig-arg">fields</span>,
185
<span class="summary-sig-arg">data</span>,
186
<span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default">'openid.'</span>)</span>
190
<td width="15%" align="right" valign="top" class="summary">
191
<span class="summary-type"> </span>
192
</td><td class="summary">
193
<span class="summary-sig"><a href="openid.association.Association-class.html#checkSignature" class="summary-sig-name">checkSignature</a>(<span class="summary-sig-arg">self</span>,
194
<span class="summary-sig-arg">data</span>,
195
<span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default">'openid.'</span>)</span>
199
<td colspan="2" class="summary">
200
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
201
<code>__delattr__</code>,
202
<code>__getattribute__</code>,
203
<code>__hash__</code>,
204
<code>__new__</code>,
205
<code>__reduce__</code>,
206
<code>__reduce_ex__</code>,
207
<code>__repr__</code>,
208
<code>__setattr__</code>,
216
<!-- ==================== CLASS METHODS ==================== -->
217
<a name="section-ClassMethods"></a>
218
<table class="summary" border="1" cellpadding="3"
219
cellspacing="0" width="100%" bgcolor="white">
220
<tr bgcolor="#70b0f0" class="table-header">
221
<td colspan="2" class="table-header">
222
<table border="0" cellpadding="0" cellspacing="0" width="100%">
224
<td align="left"><span class="table-header">Class Methods</span></td>
225
<td align="right" valign="top"
226
><span class="options">[<a href="#section-ClassMethods"
227
class="privatelink" onclick="toggle_private();"
228
>hide private</a>]</span></td>
234
<td width="15%" align="right" valign="top" class="summary">
235
<span class="summary-type"> </span>
236
</td><td class="summary">
237
<span class="summary-sig"><a href="openid.association.Association-class.html#fromExpiresIn" class="summary-sig-name">fromExpiresIn</a>(<span class="summary-sig-arg">cls</span>,
238
<span class="summary-sig-arg">expires_in</span>,
239
<span class="summary-sig-arg">handle</span>,
240
<span class="summary-sig-arg">secret</span>,
241
<span class="summary-sig-arg">assoc_type</span>)</span><br />
242
This is an alternate constructor used by the OpenID consumer
243
library to create associations.
247
<td width="15%" align="right" valign="top" class="summary">
248
<span class="summary-type"> </span>
249
</td><td class="summary">
250
<span class="summary-sig"><a href="openid.association.Association-class.html#deserialize" class="summary-sig-name">deserialize</a>(<span class="summary-sig-arg">cls</span>,
251
<span class="summary-sig-arg">assoc_s</span>)</span><br />
252
Parse an association as stored by serialize().
258
<!-- ==================== CLASS VARIABLES ==================== -->
259
<a name="section-ClassVariables"></a>
260
<table class="summary" border="1" cellpadding="3"
261
cellspacing="0" width="100%" bgcolor="white">
262
<tr bgcolor="#70b0f0" class="table-header">
263
<td colspan="2" class="table-header">
264
<table border="0" cellpadding="0" cellspacing="0" width="100%">
266
<td align="left"><span class="table-header">Class Variables</span></td>
267
<td align="right" valign="top"
268
><span class="options">[<a href="#section-ClassVariables"
269
class="privatelink" onclick="toggle_private();"
270
>hide private</a>]</span></td>
276
<td width="15%" align="right" valign="top" class="summary">
277
<span class="summary-type"> </span>
278
</td><td class="summary">
279
<a href="openid.association.Association-class.html#SIG_LENGTH">SIG_LENGTH</a> = <code title="20">20</code>
283
<td width="15%" align="right" valign="top" class="summary">
284
<span class="summary-type"> </span>
285
</td><td class="summary">
286
<a href="openid.association.Association-class.html#assoc_keys">assoc_keys</a> = <code title="['version', 'handle', 'secret', 'issued', 'lifetime', 'assoc_type']">['version', 'handle', 'secret', 'issued', 'lifetime'...</code>
292
<!-- ==================== INSTANCE VARIABLES ==================== -->
293
<a name="section-InstanceVariables"></a>
294
<table class="summary" border="1" cellpadding="3"
295
cellspacing="0" width="100%" bgcolor="white">
296
<tr bgcolor="#70b0f0" class="table-header">
297
<td colspan="2" class="table-header">
298
<table border="0" cellpadding="0" cellspacing="0" width="100%">
300
<td align="left"><span class="table-header">Instance Variables</span></td>
301
<td align="right" valign="top"
302
><span class="options">[<a href="#section-InstanceVariables"
303
class="privatelink" onclick="toggle_private();"
304
>hide private</a>]</span></td>
310
<td width="15%" align="right" valign="top" class="summary">
311
<span class="summary-type"><code>str</code></span>
312
</td><td class="summary">
313
<a href="openid.association.Association-class.html#handle">handle</a><br />
314
This is the handle the server gave this association.
318
<td width="15%" align="right" valign="top" class="summary">
319
<span class="summary-type"><code>str</code></span>
320
</td><td class="summary">
321
<a href="openid.association.Association-class.html#secret">secret</a><br />
322
This is the shared secret the server generated for this
327
<td width="15%" align="right" valign="top" class="summary">
328
<span class="summary-type"><code>int</code></span>
329
</td><td class="summary">
330
<a href="openid.association.Association-class.html#issued">issued</a><br />
331
This is the time this association was issued, in seconds since
332
00:00 GMT, January 1, 1970.
336
<td width="15%" align="right" valign="top" class="summary">
337
<span class="summary-type"><code>int</code></span>
338
</td><td class="summary">
339
<a href="openid.association.Association-class.html#lifetime">lifetime</a><br />
340
This is the amount of time this association is good for, measured
341
in seconds since the association was issued.
345
<td width="15%" align="right" valign="top" class="summary">
346
<span class="summary-type"><code>str</code></span>
347
</td><td class="summary">
348
<a href="openid.association.Association-class.html#assoc_type">assoc_type</a><br />
349
This is the type of association this instance represents.
355
<!-- ==================== PROPERTIES ==================== -->
356
<a name="section-Properties"></a>
357
<table class="summary" border="1" cellpadding="3"
358
cellspacing="0" width="100%" bgcolor="white">
359
<tr bgcolor="#70b0f0" class="table-header">
360
<td colspan="2" class="table-header">
361
<table border="0" cellpadding="0" cellspacing="0" width="100%">
363
<td align="left"><span class="table-header">Properties</span></td>
364
<td align="right" valign="top"
365
><span class="options">[<a href="#section-Properties"
366
class="privatelink" onclick="toggle_private();"
367
>hide private</a>]</span></td>
373
<td width="15%" align="right" valign="top" class="summary">
374
<span class="summary-type"> </span>
375
</td><td class="summary">
376
<a href="openid.association.Association-class.html#expiresIn">expiresIn</a>
380
<td colspan="2" class="summary">
381
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
382
<code>__class__</code>
389
<!-- ==================== METHOD DETAILS ==================== -->
390
<a name="section-MethodDetails"></a>
391
<table class="summary" border="1" cellpadding="3"
392
cellspacing="0" width="100%" bgcolor="white">
393
<tr bgcolor="#70b0f0" class="table-header">
394
<td colspan="2" class="table-header">
395
<table border="0" cellpadding="0" cellspacing="0" width="100%">
397
<td align="left"><span class="table-header">Method Details</span></td>
398
<td align="right" valign="top"
399
><span class="options">[<a href="#section-MethodDetails"
400
class="privatelink" onclick="toggle_private();"
401
>hide private</a>]</span></td>
53
<p>This class represents an association between a server and a consumer.
54
In general, users of this library will never see instances of this
55
object. The only exception is if you implement a custom <code><a
56
href="openid.store.interface.OpenIDStore-class.html"
57
class="link"><code>OpenIDStore</code></a></code>.</p>
58
If you do implement such a store, it will need to store the values of
59
the <code><a href="openid.association.Association-class.html#handle"
60
class="link"><code>handle</code></a></code>, <code><a
61
href="openid.association.Association-class.html#secret"
62
class="link"><code>secret</code></a></code>, <code><a
63
href="openid.association.Association-class.html#issued"
64
class="link"><code>issued</code></a></code>, <code><a
65
href="openid.association.Association-class.html#lifetime"
66
class="link"><code>lifetime</code></a></code>, and <code><a
67
href="openid.association.Association-class.html#assoc_type"
68
class="link"><code>assoc_type</code></a></code> instance variables.
72
<!-- =========== START OF METHOD SUMMARY =========== -->
73
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
74
<tr bgcolor="#70b0f0" class="summary">
75
<th colspan="2">Method Summary</th></tr>
76
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
77
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
78
<span class=summary-sig-arg>handle</span>,
79
<span class=summary-sig-arg>secret</span>,
80
<span class=summary-sig-arg>issued</span>,
81
<span class=summary-sig-arg>lifetime</span>,
82
<span class=summary-sig-arg>assoc_type</span>)</span></code>
84
This is the standard constructor for creating an association.</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.association.Association-class.html#fromExpiresIn" class="summary-sig-name"><code>fromExpiresIn</code></a>(<span class=summary-sig-arg>cls</span>,
87
<span class=summary-sig-arg>expires_in</span>,
88
<span class=summary-sig-arg>handle</span>,
89
<span class=summary-sig-arg>secret</span>,
90
<span class=summary-sig-arg>assoc_type</span>)</span></code>
92
This is an alternate constructor used by the OpenID consumer library
93
to create associations. <i>(Class method)</i>
95
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>int</code>
97
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#getExpiresIn" class="summary-sig-name"><code>getExpiresIn</code></a>(<span class=summary-sig-arg>self</span>,
98
<span class=summary-sig-arg>now</span>)</span></code>
100
This returns the number of seconds this association is still valid
101
for, or <code>0</code> if the association is no longer valid.</td></tr>
102
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>bool</code>
104
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#__eq__" class="summary-sig-name"><code>__eq__</code></a>(<span class=summary-sig-arg>self</span>,
105
<span class=summary-sig-arg>other</span>)</span></code>
107
This checks to see if two <code><a
108
href="openid.association.Association-class.html"
109
class="link"><code>Association</code></a></code> instances represent the
110
same association.</td></tr>
111
<tr><td align="right" valign="top" width="15%"><font size="-1"> <code>bool</code>
113
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#__ne__" class="summary-sig-name"><code>__ne__</code></a>(<span class=summary-sig-arg>self</span>,
114
<span class=summary-sig-arg>other</span>)</span></code>
116
This checks to see if two <code><a
117
href="openid.association.Association-class.html"
118
class="link"><code>Association</code></a></code> instances represent
119
different associations.</td></tr>
120
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
121
<td><code><a name="__repr__"></a><span class="summary-sig"><span class="summary-sig-name">__repr__</span>(<span class=summary-sig-arg>self</span>)</span></code>
123
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
124
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#checkMessageSignature" class="summary-sig-name"><code>checkMessageSignature</code></a>(<span class=summary-sig-arg>self</span>,
125
<span class=summary-sig-arg>message</span>)</span></code>
127
Given a message with a signature, calculate a new signature and return
128
whether it matches the signature in the message.</td></tr>
129
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
130
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#deserialize" class="summary-sig-name"><code>deserialize</code></a>(<span class=summary-sig-arg>cls</span>,
131
<span class=summary-sig-arg>assoc_s</span>)</span></code>
133
Parse an association as stored by serialize(). <i>(Class method)</i>
135
<tr><td align="right" valign="top" width="15%"><font size="-1"> str
137
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#getMessageSignature" class="summary-sig-name"><code>getMessageSignature</code></a>(<span class=summary-sig-arg>self</span>,
138
<span class=summary-sig-arg>message</span>)</span></code>
140
Return the signature of a message.</td></tr>
141
<tr><td align="right" valign="top" width="15%"><font size="-1"> str
143
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#serialize" class="summary-sig-name"><code>serialize</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
145
Convert an association to KV form.</td></tr>
146
<tr><td align="right" valign="top" width="15%"><font size="-1"> str
148
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#sign" class="summary-sig-name"><code>sign</code></a>(<span class=summary-sig-arg>self</span>,
149
<span class=summary-sig-arg>pairs</span>)</span></code>
151
Generate a signature for a sequence of (key, value) pairs</td></tr>
152
<tr><td align="right" valign="top" width="15%"><font size="-1"> <a href="openid.message.Message-class.html"
153
class="link"><code>openid.message.Message</code></a>
155
<td><code><span class="summary-sig"><a href="openid.association.Association-class.html#signMessage" class="summary-sig-name"><code>signMessage</code></a>(<span class=summary-sig-arg>self</span>,
156
<span class=summary-sig-arg>message</span>)</span></code>
158
Add a signature (and a signed list) to a message.</td></tr>
160
<b>Inherited from <a href="__builtin__.object-class.html"><code>object</code></a>:</b>
161
<a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a>,
162
<a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a>,
163
<a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a>,
164
<a href="__builtin__.object-class.html#__new__"><code>__new__</code></a>,
165
<a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a>,
166
<a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a>,
167
<a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a>,
168
<a href="__builtin__.object-class.html#__str__"><code>__str__</code></a>
173
<!-- =========== START OF PROPERTY SUMMARY =========== -->
174
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
175
<tr bgcolor="#70b0f0" class="summary">
176
<th colspan="2">Property Summary</th></tr>
177
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
178
<td><b><a href="openid.association.Association-class.html#expiresIn"><code>expiresIn</code></a></b>: This returns the number of seconds this association is still valid
179
for, or <code>0</code> if the association is no longer valid.</td></tr></table><br />
182
<!-- =========== START OF INSTANCE VARIABLE SUMMARY =========== -->
183
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
184
<tr bgcolor="#70b0f0" class="summary">
185
<th colspan="2">Instance Variable Summary</th></tr>
186
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
187
<td><b><a href="openid.association.Association-class.html#handle"><code>handle</code></a></b>: This is the handle the server gave this association.</td></tr>
188
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
189
<td><b><a href="openid.association.Association-class.html#secret"><code>secret</code></a></b>: This is the shared secret the server generated for this
190
association.</td></tr>
191
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
192
<td><b><a href="openid.association.Association-class.html#issued"><code>issued</code></a></b>: This is the time this association was issued, in seconds since 00:00
193
GMT, January 1, 1970.</td></tr>
194
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
195
<td><b><a href="openid.association.Association-class.html#lifetime"><code>lifetime</code></a></b>: This is the amount of time this association is good for, measured in
196
seconds since the association was issued.</td></tr>
197
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
198
<td><b><a href="openid.association.Association-class.html#assoc_type"><code>assoc_type</code></a></b>: This is the type of association this instance represents.</td></tr>
202
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
203
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
204
<tr bgcolor="#70b0f0" class="summary">
205
<th colspan="2">Class Variable Summary</th></tr>
206
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
207
<td><b><a href="openid.association.Association-class.html#assoc_keys"><code>assoc_keys</code></a></b> = <span title="['version', 'handle', 'secret', 'issued', 'lifetime', 'assoc_type']"><code>['version', 'handle', 'secret', 'issued', '<span class="variable-ellipsis">...</span></code>
212
<!-- =========== START OF INSTANCE METHOD DETAILS =========== -->
213
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
214
<tr bgcolor="#70b0f0" class="details">
215
<th colspan="2">Instance Method Details</th></tr>
407
218
<a name="__init__"></a>
409
<table class="details" border="1" cellpadding="3"
410
cellspacing="0" width="100%" bgcolor="white">
412
<table width="100%" cellpadding="0" cellspacing="0" border="0">
413
<tr valign="top"><td>
414
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
415
<span class="sig-arg">handle</span>,
416
<span class="sig-arg">secret</span>,
417
<span class="sig-arg">issued</span>,
418
<span class="sig-arg">lifetime</span>,
419
<span class="sig-arg">assoc_type</span>)</span>
420
<br /><em class="fname">(Constructor)</em>
422
</td><td align="right" valign="top"
423
><span class="codelink"><a href="openid.association-pysrc.html#Association.__init__">source code</a></span>
427
<br />This is the standard constructor for creating an association.
429
<dl><dt>Parameters:</dt></dl>
430
<ul class="nomargin">
431
<li><strong class="pname"><code>handle</code></strong> (<code>str</code>) - This is the handle the server gave this association.</li>
432
<li><strong class="pname"><code>secret</code></strong> (<code>str</code>) - This is the shared secret the server generated for this
434
<li><strong class="pname"><code>issued</code></strong> (<code>int</code>) - This is the time this association was issued, in seconds since
435
00:00 GMT, January 1, 1970. (ie, a unix timestamp)</li>
436
<li><strong class="pname"><code>lifetime</code></strong> (<code>int</code>) - This is the amount of time this association is good for,
437
measured in seconds since the association was issued.</li>
438
<li><strong class="pname"><code>assoc_type</code></strong> (<code>str</code>) - This is the type of association this instance represents. The
439
only valid value of this field at this time is
440
<code>'HMAC-SHA1'</code>, but new types may be defined in the
449
<a name="fromExpiresIn"></a>
451
<table class="details" border="1" cellpadding="3"
452
cellspacing="0" width="100%" bgcolor="white">
454
<table width="100%" cellpadding="0" cellspacing="0" border="0">
455
<tr valign="top"><td>
456
<h3 class="epydoc"><span class="sig"><span class="sig-name">fromExpiresIn</span>(<span class="sig-arg">cls</span>,
457
<span class="sig-arg">expires_in</span>,
458
<span class="sig-arg">handle</span>,
459
<span class="sig-arg">secret</span>,
460
<span class="sig-arg">assoc_type</span>)</span>
461
<br /><em class="fname">Class Method</em>
463
</td><td align="right" valign="top"
464
><span class="codelink"><a href="openid.association-pysrc.html#Association.fromExpiresIn">source code</a></span>
468
<br />This is an alternate constructor used by the OpenID consumer library
469
to create associations. <code><a
470
href="openid.store.interface.OpenIDStore-class.html"
471
class="link">OpenIDStore</a></code> implementations shouldn't use this
474
<dl><dt>Parameters:</dt></dl>
475
<ul class="nomargin">
476
<li><strong class="pname"><code>expires_in</code></strong> (<code>int</code>) - This is the amount of time this association is good for,
477
measured in seconds since the association was issued.</li>
478
<li><strong class="pname"><code>handle</code></strong> (<code>str</code>) - This is the handle the server gave this association.</li>
479
<li><strong class="pname"><code>secret</code></strong> (<code>str</code>) - This is the shared secret the server generated for this
481
<li><strong class="pname"><code>assoc_type</code></strong> (<code>str</code>) - This is the type of association this instance represents. The
482
only valid value of this field at this time is
483
<code>'HMAC-SHA1'</code>, but new types may be defined in the
219
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
220
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
221
<span class=sig-arg>handle</span>,
222
<span class=sig-arg>secret</span>,
223
<span class=sig-arg>issued</span>,
224
<span class=sig-arg>lifetime</span>,
225
<span class=sig-arg>assoc_type</span>)</span>
226
<br /><i>(Constructor)</i>
228
This is the standard constructor for creating an association.
230
<dl><dt><b>Parameters:</b></dt>
231
<dd><code><b>handle</b></code> -
232
This is the handle the server gave this association.
233
<br /><i>
234
(type=<code>str</code>)</i>
235
<dd><code><b>secret</b></code> -
236
This is the shared secret the server generated for this
238
<br /><i>
239
(type=<code>str</code>)</i>
240
<dd><code><b>issued</b></code> -
241
This is the time this association was issued, in seconds since
242
00:00 GMT, January 1, 1970. (ie, a unix timestamp)
243
<br /><i>
244
(type=<code>int</code>)</i>
245
<dd><code><b>lifetime</b></code> -
246
This is the amount of time this association is good for,
247
measured in seconds since the association was issued.
248
<br /><i>
249
(type=<code>int</code>)</i>
250
<dd><code><b>assoc_type</b></code> -
251
This is the type of association this instance represents. The
252
only valid value of this field at this time is
253
<code>'HMAC-SHA1'</code>, but new types may be defined in the
255
<br /><i>
256
(type=<code>str</code>)</i>
259
<dl><dt><b>Overrides:</b></dt>
260
<dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
489
265
<a name="getExpiresIn"></a>
491
<table class="details" border="1" cellpadding="3"
492
cellspacing="0" width="100%" bgcolor="white">
494
<table width="100%" cellpadding="0" cellspacing="0" border="0">
495
<tr valign="top"><td>
496
<h3 class="epydoc"><span class="sig"><span class="sig-name">getExpiresIn</span>(<span class="sig-arg">self</span>,
497
<span class="sig-arg">now</span>=<span class="sig-default">None</span>)</span>
266
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
267
<h3><span class="sig"><span class="sig-name">getExpiresIn</span>(<span class=sig-arg>self</span>,
268
<span class=sig-arg>now</span>=<span class=sig-default>None</span>)</span>
499
</td><td align="right" valign="top"
500
><span class="codelink"><a href="openid.association-pysrc.html#Association.getExpiresIn">source code</a></span>
504
<br />This returns the number of seconds this association is still valid
270
This returns the number of seconds this association is still valid
505
271
for, or <code>0</code> if the association is no longer valid.
506
272
<dl><dt></dt><dd>
507
<dl><dt>Returns: <code>int</code></dt>
508
<dd>The number of seconds this association is still valid for, or
509
<code>0</code> if the association is no longer valid.</dd></dl>
273
<dl><dt><b>Returns:</b></dt>
275
The number of seconds this association is still valid for, or
276
<code>0</code> if the association is no longer valid.
277
<br /><i>
278
(type=<code>int</code>)</i>
511
282
</td></tr></table>
513
284
<a name="__eq__"></a>
515
<table class="details" border="1" cellpadding="3"
516
cellspacing="0" width="100%" bgcolor="white">
518
<table width="100%" cellpadding="0" cellspacing="0" border="0">
519
<tr valign="top"><td>
520
<h3 class="epydoc"><span class="sig"><span class="sig-name">__eq__</span>(<span class="sig-arg">self</span>,
521
<span class="sig-arg">other</span>)</span>
522
<br /><em class="fname">(Equality operator)</em>
285
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
286
<h3><span class="sig"><span class="sig-name">__eq__</span>(<span class=sig-arg>self</span>,
287
<span class=sig-arg>other</span>)</span>
288
<br /><i>(Equality operator)</i>
524
</td><td align="right" valign="top"
525
><span class="codelink"><a href="openid.association-pysrc.html#Association.__eq__">source code</a></span>
529
<br />This checks to see if two <code><a
290
This checks to see if two <code><a
530
291
href="openid.association.Association-class.html"
531
class="link">Association</a></code> instances represent the same
292
class="link"><code>Association</code></a></code> instances represent
293
the same association.
533
294
<dl><dt></dt><dd>
534
<dl><dt>Returns: <code>bool</code></dt>
535
<dd><code>True</code> if the two instances represent the same
536
association, <code>False</code> otherwise.</dd></dl>
295
<dl><dt><b>Returns:</b></dt>
297
<code>True</code> if the two instances represent the same
298
association, <code>False</code> otherwise.
299
<br /><i>
300
(type=<code>bool</code>)</i>
538
304
</td></tr></table>
540
306
<a name="__ne__"></a>
542
<table class="details" border="1" cellpadding="3"
543
cellspacing="0" width="100%" bgcolor="white">
545
<table width="100%" cellpadding="0" cellspacing="0" border="0">
546
<tr valign="top"><td>
547
<h3 class="epydoc"><span class="sig"><span class="sig-name">__ne__</span>(<span class="sig-arg">self</span>,
548
<span class="sig-arg">other</span>)</span>
307
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
308
<h3><span class="sig"><span class="sig-name">__ne__</span>(<span class=sig-arg>self</span>,
309
<span class=sig-arg>other</span>)</span>
550
</td><td align="right" valign="top"
551
><span class="codelink"><a href="openid.association-pysrc.html#Association.__ne__">source code</a></span>
555
<br />This checks to see if two <code><a
311
This checks to see if two <code><a
556
312
href="openid.association.Association-class.html"
557
class="link">Association</a></code> instances represent different
560
<dl><dt>Returns: <code>bool</code></dt>
561
<dd><code>True</code> if the two instances represent different
562
associations, <code>False</code> otherwise.</dd></dl>
313
class="link"><code>Association</code></a></code> instances represent
314
different associations.
316
<dl><dt><b>Returns:</b></dt>
318
<code>True</code> if the two instances represent different
319
associations, <code>False</code> otherwise.
320
<br /><i>
321
(type=<code>bool</code>)</i>
327
<a name="checkMessageSignature"></a>
328
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
329
<h3><span class="sig"><span class="sig-name">checkMessageSignature</span>(<span class=sig-arg>self</span>,
330
<span class=sig-arg>message</span>)</span>
332
Given a message with a signature, calculate a new signature and
333
return whether it matches the signature in the message.
335
<dl><dt><b>Raises:</b></dt>
336
<dd><code><b>ValueError</b></code> -
337
if the message has no signature or no signature can be
343
<a name="getMessageSignature"></a>
344
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
345
<h3><span class="sig"><span class="sig-name">getMessageSignature</span>(<span class=sig-arg>self</span>,
346
<span class=sig-arg>message</span>)</span>
348
<p>Return the signature of a message.</p>
349
If I am not a sign-all association, the message must have a signed
352
<dl><dt><b>Returns:</b></dt>
354
the signature, base64 encoded
355
<br /><i>
359
<dl><dt><b>Raises:</b></dt>
360
<dd><code><b>ValueError</b></code> -
361
If there is no signed list and I am not a sign-all type of
566
367
<a name="serialize"></a>
568
<table class="details" border="1" cellpadding="3"
569
cellspacing="0" width="100%" bgcolor="white">
571
<table width="100%" cellpadding="0" cellspacing="0" border="0">
572
<tr valign="top"><td>
573
<h3 class="epydoc"><span class="sig"><span class="sig-name">serialize</span>(<span class="sig-arg">self</span>)</span>
575
</td><td align="right" valign="top"
576
><span class="codelink"><a href="openid.association-pysrc.html#Association.serialize">source code</a></span>
580
<br />Convert an association to KV form.
582
<dl><dt>Returns: str</dt>
583
<dd>String in KV form suitable for deserialization by
584
deserialize.</dd></dl>
368
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
369
<h3><span class="sig"><span class="sig-name">serialize</span>(<span class=sig-arg>self</span>)</span>
371
Convert an association to KV form.
373
<dl><dt><b>Returns:</b></dt>
375
String in KV form suitable for deserialization by
377
<br /><i>
385
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
386
<h3><span class="sig"><span class="sig-name">sign</span>(<span class=sig-arg>self</span>,
387
<span class=sig-arg>pairs</span>)</span>
389
Generate a signature for a sequence of (key, value) pairs
391
<dl><dt><b>Parameters:</b></dt>
392
<dd><code><b>pairs</b></code> -
393
The pairs to sign, in order
394
<br /><i>
395
(type=sequence of (str, str))</i>
398
<dl><dt><b>Returns:</b></dt>
400
The binary signature of this sequence of pairs
401
<br /><i>
408
<a name="signMessage"></a>
409
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
410
<h3><span class="sig"><span class="sig-name">signMessage</span>(<span class=sig-arg>self</span>,
411
<span class=sig-arg>message</span>)</span>
413
Add a signature (and a signed list) to a message.
415
<dl><dt><b>Returns:</b></dt>
417
a new Message object with a signature
418
<br /><i>
419
(type=<a href="openid.message.Message-class.html"
420
class="link"><code>openid.message.Message</code></a>)</i>
428
<!-- =========== START OF CLASS METHOD DETAILS =========== -->
429
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
430
<tr bgcolor="#70b0f0" class="details">
431
<th colspan="2">Class Method Details</th></tr>
434
<a name="fromExpiresIn"></a>
435
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
436
<h3><span class="sig"><span class="sig-name">fromExpiresIn</span>(<span class=sig-arg>cls</span>,
437
<span class=sig-arg>expires_in</span>,
438
<span class=sig-arg>handle</span>,
439
<span class=sig-arg>secret</span>,
440
<span class=sig-arg>assoc_type</span>)</span>
442
This is an alternate constructor used by the OpenID consumer library
443
to create associations. <code><a
444
href="openid.store.interface.OpenIDStore-class.html"
445
class="link"><code>OpenIDStore</code></a></code> implementations
446
shouldn't use this constructor.
448
<dl><dt><b>Parameters:</b></dt>
449
<dd><code><b>expires_in</b></code> -
450
This is the amount of time this association is good for,
451
measured in seconds since the association was issued.
452
<br /><i>
453
(type=<code>int</code>)</i>
454
<dd><code><b>handle</b></code> -
455
This is the handle the server gave this association.
456
<br /><i>
457
(type=<code>str</code>)</i>
458
<dd><code><b>secret</b></code> -
459
This is the shared secret the server generated for this
461
<br /><i>
462
(type=<code>str</code>)</i>
463
<dd><code><b>assoc_type</b></code> -
464
This is the type of association this instance represents. The
465
only valid value of this field at this time is
466
<code>'HMAC-SHA1'</code>, but new types may be defined in the
468
<br /><i>
469
(type=<code>str</code>)</i>
588
475
<a name="deserialize"></a>
590
<table class="details" border="1" cellpadding="3"
591
cellspacing="0" width="100%" bgcolor="white">
593
<table width="100%" cellpadding="0" cellspacing="0" border="0">
594
<tr valign="top"><td>
595
<h3 class="epydoc"><span class="sig"><span class="sig-name">deserialize</span>(<span class="sig-arg">cls</span>,
596
<span class="sig-arg">assoc_s</span>)</span>
597
<br /><em class="fname">Class Method</em>
476
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
477
<h3><span class="sig"><span class="sig-name">deserialize</span>(<span class=sig-arg>cls</span>,
478
<span class=sig-arg>assoc_s</span>)</span>
599
</td><td align="right" valign="top"
600
><span class="codelink"><a href="openid.association-pysrc.html#Association.deserialize">source code</a></span>
604
<br /><p>Parse an association as stored by serialize().</p>
480
<p>Parse an association as stored by serialize().</p>
605
481
inverse of serialize
606
482
<dl><dt></dt><dd>
607
<dl><dt>Parameters:</dt></dl>
608
<ul class="nomargin">
609
<li><strong class="pname"><code>assoc_s</code></strong> (str) - Association as serialized by serialize()</li>
611
<dl><dt>Returns:</dt>
612
<dd>instance of this class</dd></dl>
618
<table class="details" border="1" cellpadding="3"
619
cellspacing="0" width="100%" bgcolor="white">
621
<table width="100%" cellpadding="0" cellspacing="0" border="0">
622
<tr valign="top"><td>
623
<h3 class="epydoc"><span class="sig"><span class="sig-name">sign</span>(<span class="sig-arg">self</span>,
624
<span class="sig-arg">pairs</span>)</span>
626
</td><td align="right" valign="top"
627
><span class="codelink"><a href="openid.association-pysrc.html#Association.sign">source code</a></span>
631
<br />Generate a signature for a sequence of (key, value) pairs
633
<dl><dt>Parameters:</dt></dl>
634
<ul class="nomargin">
635
<li><strong class="pname"><code>pairs</code></strong> (sequence of (str, str)) - The pairs to sign, in order</li>
637
<dl><dt>Returns: str</dt>
638
<dd>The binary signature of this sequence of pairs</dd></dl>
642
<a name="signDict"></a>
644
<table class="details" border="1" cellpadding="3"
645
cellspacing="0" width="100%" bgcolor="white">
647
<table width="100%" cellpadding="0" cellspacing="0" border="0">
648
<tr valign="top"><td>
649
<h3 class="epydoc"><span class="sig"><span class="sig-name">signDict</span>(<span class="sig-arg">self</span>,
650
<span class="sig-arg">fields</span>,
651
<span class="sig-arg">data</span>,
652
<span class="sig-arg">prefix</span>=<span class="sig-default">'openid.'</span>)</span>
654
</td><td align="right" valign="top"
655
><span class="codelink"><a href="openid.association-pysrc.html#Association.signDict">source code</a></span>
659
<br />Generate a signature for some fields in a dictionary
661
<dl><dt>Parameters:</dt></dl>
662
<ul class="nomargin">
663
<li><strong class="pname"><code>fields</code></strong> (sequence of str) - The fields to sign, in order</li>
664
<li><strong class="pname"><code>data</code></strong> ({str:str}) - Dictionary of values to sign</li>
666
<dl><dt>Returns: str</dt>
667
<dd>the signature, base64 encoded</dd></dl>
671
<a name="addSignature"></a>
673
<table class="details" border="1" cellpadding="3"
674
cellspacing="0" width="100%" bgcolor="white">
676
<table width="100%" cellpadding="0" cellspacing="0" border="0">
677
<tr valign="top"><td>
678
<h3 class="epydoc"><span class="sig"><span class="sig-name">addSignature</span>(<span class="sig-arg">self</span>,
679
<span class="sig-arg">fields</span>,
680
<span class="sig-arg">data</span>,
681
<span class="sig-arg">prefix</span>=<span class="sig-default">'openid.'</span>)</span>
683
</td><td align="right" valign="top"
684
><span class="codelink"><a href="openid.association-pysrc.html#Association.addSignature">source code</a></span>
693
<a name="checkSignature"></a>
695
<table class="details" border="1" cellpadding="3"
696
cellspacing="0" width="100%" bgcolor="white">
698
<table width="100%" cellpadding="0" cellspacing="0" border="0">
699
<tr valign="top"><td>
700
<h3 class="epydoc"><span class="sig"><span class="sig-name">checkSignature</span>(<span class="sig-arg">self</span>,
701
<span class="sig-arg">data</span>,
702
<span class="sig-arg">prefix</span>=<span class="sig-default">'openid.'</span>)</span>
704
</td><td align="right" valign="top"
705
><span class="codelink"><a href="openid.association-pysrc.html#Association.checkSignature">source code</a></span>
715
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
716
<a name="section-ClassVariableDetails"></a>
717
<table class="summary" border="1" cellpadding="3"
718
cellspacing="0" width="100%" bgcolor="white">
719
<tr bgcolor="#70b0f0" class="table-header">
720
<td colspan="2" class="table-header">
721
<table border="0" cellpadding="0" cellspacing="0" width="100%">
723
<td align="left"><span class="table-header">Class Variable Details</span></td>
724
<td align="right" valign="top"
725
><span class="options">[<a href="#section-ClassVariableDetails"
726
class="privatelink" onclick="toggle_private();"
727
>hide private</a>]</span></td>
733
<a name="SIG_LENGTH"></a>
735
<table class="details" border="1" cellpadding="3"
736
cellspacing="0" width="100%" bgcolor="white">
738
<h3 class="epydoc">SIG_LENGTH</h3>
742
<dd><table><tr><td><pre class="variable">
743
20
744
</pre></td></tr></table></dd>
749
<a name="assoc_keys"></a>
751
<table class="details" border="1" cellpadding="3"
752
cellspacing="0" width="100%" bgcolor="white">
754
<h3 class="epydoc">assoc_keys</h3>
758
<dd><table><tr><td><pre class="variable">
759
['version', 'handle', 'secret', 'issued', 'lifetime', 'assoc_type']
760
</pre></td></tr></table></dd>
766
<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
767
<a name="section-InstanceVariableDetails"></a>
768
<table class="summary" border="1" cellpadding="3"
769
cellspacing="0" width="100%" bgcolor="white">
770
<tr bgcolor="#70b0f0" class="table-header">
771
<td colspan="2" class="table-header">
772
<table border="0" cellpadding="0" cellspacing="0" width="100%">
774
<td align="left"><span class="table-header">Instance Variable Details</span></td>
775
<td align="right" valign="top"
776
><span class="options">[<a href="#section-InstanceVariableDetails"
777
class="privatelink" onclick="toggle_private();"
778
>hide private</a>]</span></td>
483
<dl><dt><b>Parameters:</b></dt>
484
<dd><code><b>assoc_s</b></code> -
485
Association as serialized by serialize()
486
<br /><i>
490
<dl><dt><b>Returns:</b></dt>
492
instance of this class
500
<!-- =========== START OF PROPERTY DETAILS =========== -->
501
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
502
<tr bgcolor="#70b0f0" class="details">
503
<th colspan="2">Property Details</th></tr>
505
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
507
<a name="expiresIn"></a>
509
This returns the number of seconds this association is still valid
510
for, or <code>0</code> if the association is no longer valid.
515
<dt><b>Get Method:</b></dt>
516
<dd><span class="summary-sig"><a href="openid.association.Association-class.html#getExpiresIn" class="summary-sig-name"><code>getExpiresIn</code></a>(<span class=summary-sig-arg>self</span>,
517
<span class=summary-sig-arg>now</span>)</span>
521
</dl></td></tr></table><br />
524
<!-- =========== START OF INSTANCE VARIABLE DETAILS =========== -->
525
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
526
<tr bgcolor="#70b0f0" class="details">
527
<th colspan="2">Instance Variable Details</th></tr>
529
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
784
530
<a name="handle"></a>
786
<table class="details" border="1" cellpadding="3"
787
cellspacing="0" width="100%" bgcolor="white">
789
<h3 class="epydoc">handle</h3>
790
<br />This is the handle the server gave this association.
793
<dd><code>str</code></dd></dl>
532
This is the handle the server gave this association.
537
<dt><b>Type:</b></dt>
544
</dl></td></tr></table>
545
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
797
546
<a name="secret"></a>
799
<table class="details" border="1" cellpadding="3"
800
cellspacing="0" width="100%" bgcolor="white">
802
<h3 class="epydoc">secret</h3>
803
<br />This is the shared secret the server generated for this
807
<dd><code>str</code></dd></dl>
548
This is the shared secret the server generated for this
554
<dt><b>Type:</b></dt>
561
</dl></td></tr></table>
562
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
811
563
<a name="issued"></a>
813
<table class="details" border="1" cellpadding="3"
814
cellspacing="0" width="100%" bgcolor="white">
816
<h3 class="epydoc">issued</h3>
817
<br />This is the time this association was issued, in seconds since 00:00
818
GMT, January 1, 1970. (ie, a unix timestamp)
821
<dd><code>int</code></dd></dl>
565
This is the time this association was issued, in seconds since 00:00
566
GMT, January 1, 1970. (ie, a unix timestamp)
571
<dt><b>Type:</b></dt>
578
</dl></td></tr></table>
579
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
825
580
<a name="lifetime"></a>
827
<table class="details" border="1" cellpadding="3"
828
cellspacing="0" width="100%" bgcolor="white">
830
<h3 class="epydoc">lifetime</h3>
831
<br />This is the amount of time this association is good for, measured in
832
seconds since the association was issued.
835
<dd><code>int</code></dd></dl>
582
This is the amount of time this association is good for, measured in
583
seconds since the association was issued.
588
<dt><b>Type:</b></dt>
595
</dl></td></tr></table>
596
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
839
597
<a name="assoc_type"></a>
841
<table class="details" border="1" cellpadding="3"
842
cellspacing="0" width="100%" bgcolor="white">
844
<h3 class="epydoc">assoc_type</h3>
845
<br />This is the type of association this instance represents. The only
846
valid value of this field at this time is <code>'HMAC-SHA1'</code>, but
847
new types may be defined in the future.
850
<dd><code>str</code></dd></dl>
599
This is the type of association this instance represents. The only
600
valid value of this field at this time is <code>'HMAC-SHA1'</code>, but
601
new types may be defined in the future.
606
<dt><b>Type:</b></dt>
613
</dl></td></tr></table>
855
<!-- ==================== PROPERTY DETAILS ==================== -->
856
<a name="section-PropertyDetails"></a>
857
<table class="summary" border="1" cellpadding="3"
858
cellspacing="0" width="100%" bgcolor="white">
859
<tr bgcolor="#70b0f0" class="table-header">
860
<td colspan="2" class="table-header">
861
<table border="0" cellpadding="0" cellspacing="0" width="100%">
863
<td align="left"><span class="table-header">Property Details</span></td>
864
<td align="right" valign="top"
865
><span class="options">[<a href="#section-PropertyDetails"
866
class="privatelink" onclick="toggle_private();"
867
>hide private</a>]</span></td>
617
<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
618
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
619
<tr bgcolor="#70b0f0" class="details">
620
<th colspan="2">Class Variable Details</th></tr>
873
<a name="expiresIn"></a>
875
<table class="details" border="1" cellpadding="3"
876
cellspacing="0" width="100%" bgcolor="white">
878
<h3 class="epydoc">expiresIn</h3>
881
<dl><dt>Get Method:</dt>
882
<dd><span class="summary-sig"><a href="openid.association.Association-class.html#getExpiresIn" class="summary-sig-name">openid.association.Association.getExpiresIn</a>(<span class="summary-sig-arg">self</span>,
883
<span class="summary-sig-arg">now</span>=<span class="summary-sig-default">None</span>)</span>
884
- This returns the number of seconds this association is still valid
885
for, or <code>0</code> if the association is no longer valid.
622
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
623
<a name="assoc_keys"></a>
629
<dt><b>Type:</b></dt>
634
<span title="['version', 'handle', 'secret', 'issued', 'lifetime', 'assoc_type']"> <dt><b>Value:</b></dt>
636
<pre class="variable">
637
['version', 'handle', 'secret', 'issued', 'lifetime', 'assoc_type'] </pre>
638
</td></tr></table></dd>
641
</dl></td></tr></table>
891
<!-- ==================== NAVIGATION BAR ==================== -->
892
<table class="navbar" border="0" width="100%" cellpadding="0"
893
bgcolor="#a0c0ff" cellspacing="0">
896
<th> <a
897
href="openid-module.html">Home</a> </th>
900
<th> <a
901
href="module-tree.html">Trees</a> </th>
904
<th> <a
905
href="identifier-index.html">Indices</a> </th>
908
<th> <a
909
href="help.html">Help</a> </th>
911
<!-- Project homepage -->
912
<th class="navbar" align="right" width="100%">
913
<table border="0" cellpadding="0" cellspacing="0">
914
<tr><th class="navbar" align="center"
915
><a class="navbar" target="_top" href="http://www.openidenabled.com/">Python-OpenID</a></th>
645
<!-- =========== START OF NAVBAR =========== -->
646
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
648
<th class="navbar"> <a class="navbar" href="openid-module.html">Home</a> </th>
649
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
650
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
651
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
652
<th class="navbar" align="right" width="100%">
653
<table border="0" cellpadding="0" cellspacing="0">
654
<tr><th class="navbar" align="center">
656
<a class="navbar" target="_top" href="http://www.openidenabled.com/">Python-OpenID</a>
657
</p></th></tr></table>
919
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
662
<table border="0" cellpadding="0" cellspacing="0" width="100%">
921
<td align="left" class="footer">Generated by Epydoc
922
3.0alpha3 on Fri Dec 8 13:26:20 2006</td>
923
<td align="right" class="footer">
924
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
664
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Mon Sep 10 13:00:12 2007</font></td>
665
<td align="right"><a href="http://epydoc.sourceforge.net"
666
><font size="-2">http://epydoc.sf.net</font></a></td>
929
<script type="text/javascript">
931
// Private objects are initially displayed (because if
932
// javascript is turned off then we want them to be
933
// visible); but by default, we want to hide them. So hide
934
// them unless we have a cookie that says to show them.