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 Auth_OpenID_Decoder::decode() and Auth_OpenID_SigningEncoder::encode() through my methods decodeRequest and encodeResponse.
All my state is encapsulated in an Auth_OpenID_OpenIDStore.
Example:
$oserver = new Auth_OpenID_Server(Auth_OpenID_FileStore($data_path), "http://example.com/op"); $request = $oserver->decodeRequest(); if (in_array($request->mode, array('checkid_immediate', 'checkid_setup'))) { if ($app->isAuthorized($request->identity, $request->trust_root)) { $response = $request->answer(true); } else if ($request->immediate) { $response = $request->answer(false); } else { $app->showDecidePage($request); return; } } else { $response = $oserver->handleRequest($request); } $webresponse = $oserver->encode($response);
Located in /Auth/OpenID/Server.php (line 1681)
Decodes a query args array into the appropriate Auth_OpenID_Request object.
Encodes as response in the appropriate format suitable for sending to the user agent.
Handle a request. Given an Auth_OpenID_Request object, call the appropriate Auth_OpenID_Server method to process the request and generate a response.
The callback for 'associate' messages.
The callback for 'check_authentication' messages.
Documentation generated on Thu, 29 Jul 2010 13:59:27 -0700 by phpDocumentor 1.4.3