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

Class ProtocolError

source code

              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        exceptions.Exception --+
                               |
                              ProtocolError
Known Subclasses:

A message did not conform to the OpenID protocol.

Instance Methods
 
__init__(self, message, text=None, reference=None, contact=None)
When an error occurs.
source code
str
getReturnTo(self)
Get the return_to argument from the request, if any.
source code
bool
hasReturnTo(self)
Did this request have a return_to parameter?
source code
 
toMessage(self)
Generate a Message object for sending to the relying party, after encoding.
source code
 
encodeToURL(self) source code
 
encodeToKVForm(self) source code
 
toFormMarkup(self)
Encode to HTML form markup for POST.
source code
 
toHTML(self)
Encode to a full HTML page, wrapping the form markup in a page that will autosubmit the form.
source code
 
whichEncoding(self)
How should I be encoded?
source code

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__

Inherited from object: __hash__, __reduce_ex__

Instance Variables
openid.message.Message message
The query that is failing to be a valid OpenID request.
Properties

Inherited from exceptions.BaseException: args

Inherited from object: __class__

Method Details

__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: object.__init__

toFormMarkup(self)

source code 

Encode to HTML form markup for POST.

Since: 2.1.0

toHTML(self)

source code 

Encode to a full HTML page, wrapping the form markup in a page that will autosubmit the form.

Since: 2.1.?

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.