Home | Trees | Index | Help |
|
---|
Package openid :: Module association :: Class Association |
|
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.
Method Summary | |
---|---|
This is the standard constructor for creating an association. | |
This is an alternate constructor used by the OpenID consumer library to create associations. (Class method) | |
int
|
This returns the number of seconds this association is still valid for, or 0 if the association is no longer valid. |
bool
|
This checks to see if two instances represent the
same association. |
bool
|
This checks to see if two instances represent
different associations. |
__repr__(self)
| |
Given a message with a signature, calculate a new signature and return whether it matches the signature in the message. | |
Parse an association as stored by serialize(). (Class method) | |
str |
Return the signature of a message. |
str |
Convert an association to KV form. |
str |
Generate a signature for a sequence of (key, value) pairs |
openid.message.Message
|
Add a signature (and a signed list) to a message. |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
Property Summary | |
---|---|
expiresIn : This returns the number of seconds this association is still valid
for, or 0 if the association is no longer valid. |
Instance Variable Summary | |
---|---|
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. |
Class Variable Summary | |
---|---|
list |
assoc_keys = ['version', 'handle', 'secret', 'issued', '...
|
Instance Method Details |
---|
__init__(self,
handle,
secret,
issued,
lifetime,
assoc_type)
This is the standard constructor for creating an association.
|
getExpiresIn(self, now=None)This returns the number of seconds this association is still valid for, or0 if the association is no longer valid.
|
__eq__(self,
other)
This checks to see if two |
__ne__(self, other)This checks to see if two instances represent
different associations.
|
checkMessageSignature(self, message)Given a message with a signature, calculate a new signature and return whether it matches the signature in the message.
|
getMessageSignature(self, message)Return the signature of a message. If I am not a sign-all association, the message must have a signed list.
|
serialize(self)Convert an association to KV form.
|
sign(self, pairs)Generate a signature for a sequence of (key, value) pairs
|
signMessage(self, message)Add a signature (and a signed list) to a message.
|
Class Method Details |
---|
fromExpiresIn(cls, expires_in, handle, secret, assoc_type)This is an alternate constructor used by the OpenID consumer library to create associations. implementations
shouldn't use this constructor.
|
deserialize(cls, assoc_s)Parse an association as stored by serialize(). inverse of serialize
|
Property Details |
---|
expiresInThis returns the number of seconds this association is still valid for, or0 if the association is no longer valid.
|
Instance Variable Details |
---|
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.
|
Class Variable Details |
---|
assoc_keys
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 27 15:48:22 2008 | http://epydoc.sf.net |