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
 
__init__(self, request)
Make a response to an OpenIDRequest.
source code
 
__str__(self)
str(x)
source code
str
toFormMarkup(self, form_tag_attrs=None)
Returns the form markup for this response.
source code
str
toHTML(self, form_tag_attrs=None)
Returns an HTML document that auto-submits the form markup for this response.
source code
bool
renderAsForm(self)
Returns True if this response's encoding is ENCODE_HTML_FORM.
source code
bool
needsSigning(self)
Does this response require signing?
source code
 
whichEncoding(self)
How should I be encoded?
source code
str
encodeToURL(self)
Encode a response as a URL for the user agent to GET.
source code
None
addExtension(self, extension_response)
Add an extension response to this response message.
source code
str
encodeToKVForm(self)
Encode a response in key-value colon/newline format.
source code

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

Instance Variables
openid.message.Message 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

Inherited from object: __class__

Method Details

__init__(self, request)
(Constructor)

source code 

Make a response to an OpenIDRequest.

Parameters:
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

toFormMarkup(self, form_tag_attrs=None)

source code 

Returns the form markup for this response.

Parameters:
  • form_tag_attrs - Dictionary of attributes to be added to the form tag. 'accept-charset' and 'enctype' have defaults that can be overridden. If a value is supplied for 'action' or 'method', it will be replaced.
Returns: str

Since: 2.1.0

toHTML(self, form_tag_attrs=None)

source code 

Returns an HTML document that auto-submits the form markup for this response.

Returns: str

See Also: toFormMarkup

Since: 2.1.?

renderAsForm(self)

source code 

Returns True if this response's encoding is ENCODE_HTML_FORM. Convenience method for server authors.

Returns: bool

Since: 2.1.0

whichEncoding(self)

source code 

How should I be encoded?

Returns:
one of ENCODE_URL, ENCODE_HTML_FORM, or ENCODE_KVFORM.

Change Log: 2.1.0 added the ENCODE_HTML_FORM response.

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

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:
openid.message.Message