| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Association
This class represents an association between a server and a consumer.
In general, users of this library will never see instances of this
object. The only exception is if you implement a custom OpenIDStore.
handle, secret, issued, lifetime, and assoc_type instance variables.
|
|||
|
__init__(self,
handle,
secret,
issued,
lifetime,
assoc_type) This is the standard constructor for creating an association. |
|||
int
|
getExpiresIn(self,
now=None) This returns the number of seconds this association is still valid for, or 0 if the association is no longer valid.
|
||
bool
|
__eq__(self,
other) This checks to see if two Association instances represent the same
association.
|
||
bool
|
__ne__(self,
other) This checks to see if two Association instances represent different
associations.
|
||
| str |
serialize(self) Convert an association to KV form. |
||
| str |
sign(self,
pairs) Generate a signature for a sequence of (key, value) pairs |
||
| str |
signDict(self,
fields,
data,
prefix='openid.') Generate a signature for some fields in a dictionary |
||
| addSignature(self, fields, data, prefix='openid.') | |||
| checkSignature(self, data, prefix='openid.') | |||
|
Inherited from |
|||
|
|||
|
fromExpiresIn(cls,
expires_in,
handle,
secret,
assoc_type) This is an alternate constructor used by the OpenID consumer library to create associations. |
|||
|
deserialize(cls,
assoc_s) Parse an association as stored by serialize(). |
|||
|
|||
SIG_LENGTH = 20
|
|||
assoc_keys = ['version', 'handle', 'secret', 'issued', 'lifetime'...
|
|||
|
|||
str
|
handle This is the handle the server gave this association. |
||
str
|
secret This is the shared secret the server generated for this association. |
||
int
|
issued This is the time this association was issued, in seconds since 00:00 GMT, January 1, 1970. |
||
int
|
lifetime This is the amount of time this association is good for, measured in seconds since the association was issued. |
||
str
|
assoc_type This is the type of association this instance represents. |
||
|
|||
| expiresIn | |||
|
Inherited from |
|||
|
|||
This is the standard constructor for creating an association.
|
This is an alternate constructor used by the OpenID consumer library to create associations. OpenIDStore implementations shouldn't use this
constructor.
|
This returns the number of seconds this association is still valid for, or 0 if the association is no longer valid.
|
This checks to see if two Association instances represent the same
association.
|
This checks to see if two Association instances represent different
associations.
|
Convert an association to KV form.
|
Parse an association as stored by serialize(). inverse of serialize
|
Generate a signature for a sequence of (key, value) pairs
|
Generate a signature for some fields in a dictionary
|
|
|
|
|||
SIG_LENGTH
|
assoc_keys
|
|
|||
handleThis is the handle the server gave this association.
|
secretThis is the shared secret the server generated for this association.
|
issuedThis is the time this association was issued, in seconds since 00:00 GMT, January 1, 1970. (ie, a unix timestamp)
|
lifetimeThis is the amount of time this association is good for, measured in seconds since the association was issued.
|
assoc_typeThis is the type of association this instance represents. The only valid value of this field at this time is 'HMAC-SHA1', but
new types may be defined in the future.
|
|
|||
expiresIn
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Fri Dec 8 13:26:20 2006 | http://epydoc.sourceforge.net |