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

Class ProtocolError

source code

exceptions.Exception --+
                       |
                      ProtocolError
Known Subclasses:
MalformedReturnURL, MalformedTrustRoot, UntrustedReturnURL

A message did not conform to the OpenID protocol.

Instance Methods [hide private]
  __init__(self, message, text=None, reference=None, contact=None)
When an error occurs.
str getReturnTo(self)
Get the return_to argument from the request, if any.
bool hasReturnTo(self)
Did this request have a return_to parameter?
  toMessage(self)
Generate a Message object for sending to the relying party, after encoding.
  encodeToURL(self)
  encodeToKVForm(self)
  whichEncoding(self)
How should I be encoded?

Inherited from exceptions.Exception: __getitem__, __str__


Instance Variables [hide private]
openid.message.Message message
The query that is failing to be a valid OpenID request.

Method Details [hide private]

__init__(self, message, text=None, reference=None, contact=None)
(Constructor)

source code 

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

getReturnTo(self)

source code 

Get the return_to argument from the request, if any.
Returns: str

hasReturnTo(self)

source code 

Did this request have a return_to parameter?
Returns: bool

toMessage(self)

source code 

Generate a Message object for sending to the relying party, after encoding.

encodeToURL(self)

source code 

encodeToKVForm(self)

source code 

whichEncoding(self)

source code 

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 [hide private]

message


The query that is failing to be a valid OpenID request.
Type:
openid.message.Message