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

Type ProtocolError

   object --+        
            |        
BaseException --+    
                |    
        Exception --+
                    |
                   ProtocolError

Known Subclasses:
MalformedReturnURL, MalformedTrustRoot, UntrustedReturnURL

A message did not conform to the OpenID protocol.
Method Summary
  __init__(self, query, text)
When an error occurs.
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 hasReturnTo(self)
Did this request have a return_to parameter?
  whichEncoding(self)
How should I be encoded?
Inherited from Exception: __new__
Inherited from BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__
Inherited from object: __hash__, __reduce_ex__

Instance Variable Summary
dict query: The query that is failing to be a valid OpenID request.

Class Variable Summary
Inherited from BaseException: args, message

Method Details

__init__(self, query, text=None)
(Constructor)

When an error occurs.
Parameters:
query - The query that is failing to be a valid OpenID request.
           (type=dict)
text - A message about the encountered error. Set as args[0].
           (type=str)
Overrides:
exceptions.Exception.__init__

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)

hasReturnTo(self)

Did this request have a return_to parameter?
Returns:
bool

whichEncoding(self)

How should I be encoded?
Returns:
one of ENCODE_URL, ENCODE_KVFORM, or None. If None, I cannot be encoded as a protocol message and should be displayed to the user.

Instance Variable Details

query

The query that is failing to be a valid OpenID request.
Type:
dict

Generated by Epydoc 2.1 on Mon Jun 11 13:48:25 2007 http://epydoc.sf.net