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

Class OpenIDResponse

source code

object --+
         |
        OpenIDResponse

I am a response to an OpenID request.

Instance Methods [hide private]
  __init__(self, request)
Make a response to an OpenIDRequest.
  __str__(self)
str(x)
bool needsSigning(self)
Does this response require signing?
  whichEncoding(self)
How should I be encoded?
str encodeToURL(self)
Encode a response as a URL for the user agent to GET.
None addExtension(self, extension_response)
Add an extension response to this response message.
str encodeToKVForm(self)
Encode a response in key-value colon/newline format.

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


Instance Variables [hide private]
dict fields
My parameters as a dictionary with each key mapping to one value.
OpenIDRequest request
The request I respond to.
list of str signed
The names of the fields which should be signed.

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, request)
(Constructor)

source code 

Make a response to an OpenIDRequest.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)
Overrides: object.__str__
(inherited documentation)

needsSigning(self)

source code 

Does this response require signing?
Returns: bool

whichEncoding(self)

source code 

How should I be encoded?
Returns:
one of ENCODE_URL or ENCODE_KVFORM.

encodeToURL(self)

source code 

Encode a response as a URL for the user agent to GET.

You will generally use this URL with a HTTP redirect.
Returns: str
A URL to direct the user agent back to.

addExtension(self, extension_response)

source code 

Add an extension response to this response message.
Parameters:
  • extension_response (openid.extension) - An object that implements the extension interface for adding arguments to an OpenID message.
Returns: None

encodeToKVForm(self)

source code 

Encode a response in key-value colon/newline format.

This is a machine-readable format used to respond to messages which came directly from the consumer and not through the user agent.
Returns: str

See Also: OpenID Specs, Key-Value Colon/Newline format


Instance Variable Details [hide private]

fields


My parameters as a dictionary with each key mapping to one value. Keys are parameter names with no leading "openid.". e.g. "identity" and "mac_key", never "openid.identity".
Type:
dict

request


The request I respond to.
Type:
OpenIDRequest

signed


The names of the fields which should be signed.
Type:
list of str