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

Class AssociateRequest

source code

   object --+    
            |    
OpenIDRequest --+
                |
               AssociateRequest

A request to establish an association.


See Also: OpenID Specs, Mode: associate

Instance Methods
 
__init__(self, session, assoc_type)
Construct me.
source code
OpenIDResponse
answer(self, assoc)
Respond to this request with an association.
source code
 
answerUnsupported(self, message, preferred_association_type=None, preferred_session_type=None)
Respond to this request indicating that the association type or association session type is not supported.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods
AssociateRequest
fromMessage(klass, message, op_endpoint=None)
Construct me from an OpenID Message.
source code
Class Variables
str mode = 'associate'
the openid.mode of this request.
  session_classes = {'DH-SHA1': <class 'openid.server.server.Dif...
Instance Variables
str assoc_type
The type of association.
  session
An object that knows how to handle association requests of a certain type.
Properties

Inherited from object: __class__

Method Details

__init__(self, session, assoc_type)
(Constructor)

source code 

Construct me.

The session is assigned directly as a class attribute. See my class documentation for its description.

Overrides: object.__init__

fromMessage(klass, message, op_endpoint=None)
Class Method

source code 

Construct me from an OpenID Message.

Parameters:
  • message (openid.message.Message) - The OpenID associate request
Returns: AssociateRequest

answer(self, assoc)

source code 

Respond to this request with an association.

Parameters:
Returns: OpenIDResponse
A response with the association information, encrypted to the consumer's public key if appropriate.

Class Variable Details

session_classes

Value:
{'DH-SHA1': <class 'openid.server.server.DiffieHellmanSHA1ServerSessio\
n'>,
 'DH-SHA256': <class 'openid.server.server.DiffieHellmanSHA256ServerSe\
ssion'>,
 'no-encryption': <class 'openid.server.server.PlainTextServerSession'\
>}

Instance Variable Details

assoc_type

The type of association. The protocol currently only defines one value for this, "HMAC-SHA1".
Type:
str