Class Auth_OpenID_Server
I handle requests for an OpenID server.
Some types of requests (those which are not checkid requests) may
be handed to my Auth_OpenID_Server::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 Auth_OpenID_Server::decodeRequest()
and Auth_OpenID_Server::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);
Copyright: 2005-2008 Janrain, Inc.
License: Apache
Author: JanRain, Inc. openid@janrain.com
Located at zp-extensions/federated_logon/Auth/OpenID/Server.php
public
|
|
public
|
#
handleRequest(
Handle a request. Given an |
public
|
|
public
|
|
public
|
#
encodeResponse( $response )
Encodes as response in the appropriate format suitable for sending to the user agent. |
public
|
#
decodeRequest( $query = null )
Decodes a query args array into the appropriate
|