JanRain OpenID Library

Auth_OpenID_Server
in package

I handle requests for an OpenID server.

Some types of requests (those which are not checkid requests) may be handed to my method, and I will take care of it and return a response.

For your convenience, I also provide an interface to and through my methods and .

All my state is encapsulated in an .

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);

Table of Contents

$op_endpoint  : Auth_OpenID_ServiceEndpoint|null
$decoder  : Auth_OpenID_Decoder
$encoder  : Auth_OpenID_SigningEncoder
$negotiator  : Auth_OpenID_SessionNegotiator
$signatory  : Auth_OpenID_Signatory
$store  : Auth_OpenID_OpenIDStore
__construct()  : mixed
Auth_OpenID_Server constructor.
decodeRequest()  : Auth_OpenID_ServerError|mixed
Decodes a query args array into the appropriate {@link Auth_OpenID_Request} object.
encodeResponse()  : Auth_OpenID_AlreadySigned|Auth_OpenID_EncodingError|Auth_OpenID_ServerError
Encodes as response in the appropriate format suitable for sending to the user agent.
handleRequest()  : Auth_OpenID_ServerResponse
Handle a request. Given an {@link Auth_OpenID_Request} object, call the appropriate {@link Auth_OpenID_Server} method to process the request and generate a response.
openid_associate()  : mixed
The callback for 'associate' messages.
openid_check_authentication()  : mixed
The callback for 'check_authentication' messages.

Properties

Methods

decodeRequest()

Decodes a query args array into the appropriate {@link Auth_OpenID_Request} object.

public decodeRequest([array<string|int, mixed>|null $query = null ]) : Auth_OpenID_ServerError|mixed
Parameters
$query : array<string|int, mixed>|null = null
Return values
Auth_OpenID_ServerError|mixed

Search results