Package openid :: Package server :: Module server :: Class Signatory
[frames | no frames]

Type Signatory

object --+
         |
        Signatory


I sign things.

I also check signatures.

All my state is encapsulated in an OpenIDStore, which means I'm not generally pickleable but I am easy to reconstruct.
Method Summary
  __init__(self, store)
Create a new Signatory.
openid.association.Association createAssociation(self, dumb, assoc_type)
Make a new association.
openid.association.Association getAssociation(self, assoc_handle, dumb, checkExpiration)
Get the association with the specified handle.
  invalidate(self, assoc_handle, dumb)
Invalidates the association with the given handle.
OpenIDResponse sign(self, response)
Sign a response.
bool verify(self, assoc_handle, message)
Verify that the signature for some data is valid.
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variable Summary
int SECRET_LIFETIME: The number of seconds a secret remains valid.

Method Details

__init__(self, store)
(Constructor)

Create a new Signatory.
Parameters:
store - The back-end where my associations are stored.
           (type=openid.store.interface.OpenIDStore)
Overrides:
__builtin__.object.__init__

createAssociation(self, dumb=True, assoc_type='HMAC-SHA1')

Make a new association.
Parameters:
dumb - Is this association for a dumb-mode transaction?
           (type=bool)
assoc_type - The type of association to create. Currently there is only one type defined, HMAC-SHA1.
           (type=str)
Returns:
the new association.
           (type=openid.association.Association)

getAssociation(self, assoc_handle, dumb, checkExpiration=True)

Get the association with the specified handle.
Parameters:
assoc_handle
           (type=str)
dumb - Is this association used with dumb mode?
           (type=bool)
Returns:
the association, or None if no valid association with that handle was found.
           (type=openid.association.Association)

invalidate(self, assoc_handle, dumb)

Invalidates the association with the given handle.
Parameters:
assoc_handle
           (type=str)
dumb - Is this association used with dumb mode?
           (type=bool)

sign(self, response)

Sign a response.

I take a OpenIDResponse, create a signature for everything in its signed list, and return a new copy of the response object with that signature included.
Parameters:
response - A response to sign.
           (type=OpenIDResponse)
Returns:
A signed copy of the response.
           (type=OpenIDResponse)

verify(self, assoc_handle, message)

Verify that the signature for some data is valid.
Parameters:
assoc_handle - The handle of the association used to sign the data.
           (type=str)
message - The signed message to verify
           (type=openid.message.Message)
Returns:
True if the signature is valid, False if not.
           (type=bool)

Class Variable Details

SECRET_LIFETIME

The number of seconds a secret remains valid.
Type:
int
Value:
1209600                                                               

Generated by Epydoc 2.1 on Wed Nov 14 17:47:20 2007 http://epydoc.sf.net