| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
Server
I handle requests for an OpenID server.
Some types of requests (those which are not checkid
requests) may be handed to my handleRequest method, and I will take care of it and
return a response.
For your convenience, I also provide an interface to Decoder.decode and SigningEncoder.encode through my methods decodeRequest and encodeResponse.
All my state is encapsulated in an OpenIDStore, which means I'm not generally pickleable but I am easy to reconstruct.
Example:
oserver = Server(FileOpenIDStore(data_path), "http://example.com/op")
request = oserver.decodeRequest(query)
if request.mode in ['checkid_immediate', 'checkid_setup']:
if self.isAuthorized(request.identity, request.trust_root):
response = request.answer(True)
elif request.immediate:
response = request.answer(False)
else:
self.showDecidePage(request)
return
else:
response = oserver.handleRequest(request)
webresponse = oserver.encode(response)
|
|||
|
signatoryClass I sign things. |
|||
|
encoderClass I encode responses in to WebResponses, signing them when required. |
|||
|
decoderClass I decode an incoming web request in to a OpenIDRequest. |
|||
|
|||
|
|||
| OpenIDResponse |
|
||
| OpenIDResponse |
|
||
| OpenIDResponse |
|
||
| OpenIDRequest |
|
||
| WebResponse |
|
||
|
Inherited from |
|||
|
|||
| Decoder |
decoder I'm using this to decode things. |
||
| Encoder |
encoder I'm using this to encode things. |
||
| openid.association.SessionNegotiator |
negotiator I use this to determine which kinds of associations I can make and how. |
||
| str |
op_endpoint My URL. |
||
| Signatory |
signatory I'm using this for associate requests and to sign things. |
||
|
|||
|
Inherited from |
|||
|
|||
A new Server.
Change Log:
|
Handle a request. Give me a request, I will give you a response. Unless it's a type of
request I cannot handle myself, in which case I will raise
|
Transform query parameters into an OpenIDRequest. If the query does not seem to be an OpenID request at all, I return
See Also: Decoder.decode |
Encode a response to a WebResponse, signing it first if appropriate.
See Also: SigningEncoder.encode |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Dec 17 16:12:37 2011 | http://epydoc.sourceforge.net |