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

Type OpenIDResponse

object --+
         |
        OpenIDResponse


I am a response to an OpenID request.
Method Summary
  __init__(self, request)
Make a response to an OpenIDRequest.
  __str__(self)
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.
str encodeToURL(self)
Encode a response as a URL for the user agent to GET.
bool needsSigning(self)
Does this response require signing?
bool renderAsForm(self)
Returns True if this response's encoding is ENCODE_HTML_FORM.
str toFormMarkup(self, form_tag_attrs)
Returns the form markup for this response.
str toHTML(self, form_tag_attrs)
Returns an HTML document that auto-submits the form markup for this response.
  whichEncoding(self)
How should I be encoded?
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Instance Variable Summary
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.

Method Details

__init__(self, request)
(Constructor)

Make a response to an OpenIDRequest.
Parameters:
request
           (type=OpenIDRequest)
Overrides:
__builtin__.object.__init__

addExtension(self, extension_response)

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

encodeToKVForm(self)

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

encodeToURL(self)

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

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

needsSigning(self)

Does this response require signing?
Returns:
bool

renderAsForm(self)

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

Since: 2.1.0

toFormMarkup(self, form_tag_attrs=None)

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)

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

Since: 2.1.?

See Also: toFormMarkup

whichEncoding(self)

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

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

request

The request I respond to.
Type:
OpenIDRequest

signed

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

Generated by Epydoc 2.1 on Fri Jun 27 15:48:22 2008 http://epydoc.sf.net