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 [hide private]
  __init__(self, session, assoc_type)
Construct me.
OpenIDResponse answer(self, assoc)
Respond to this request with an association.
  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.

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


Class Methods [hide private]
AssociateRequest fromMessage(klass, message, op_endpoint=None)
Construct me from an OpenID Message.

Class Variables [hide private]
str mode = 'associate'
the openid.mode of this request.
  session_classes = {'no-encryption': <class 'openid.server.server.Plain...

Instance Variables [hide private]
str assoc_type
The type of association.
  session
An object that knows how to handle association requests of a certain type.

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__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.

answerUnsupported(self, message, preferred_association_type=None, preferred_session_type=None)

source code 

Respond to this request indicating that the association type or association session type is not supported.

Class Variable Details [hide private]

mode


the openid.mode of this request.
Type:
str
Value:
'associate'                                                            
      

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 [hide private]

assoc_type


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

session


An object that knows how to handle association requests of a certain type.