Package openid :: Package server :: Module server :: Class AssociateRequest
[hide private]
[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.
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__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
AssociateRequest
fromMessage(klass, message, op_endpoint=UNUSED)
Construct me from an OpenID Message.
source code
Class Variables [hide private]
str mode = "associate"
the openid.mode of this request.
  session_classes = {'no-encryption': PlainTextServerSession, 'D...
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=UNUSED)
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 [hide private]

session_classes

Value:
{'no-encryption': PlainTextServerSession, 'DH-SHA1': DiffieHellmanSHA1\
ServerSession, 'DH-SHA256': DiffieHellmanSHA256ServerSession,}

Instance Variable Details [hide private]

assoc_type

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