## Class Auth_OpenID_Server

Description

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

Method Summary
Auth_OpenID_Server Auth_OpenID_Server ( &$store, [ $op_endpoint = null])
void decodeRequest ([ $query = null])
void encodeResponse ( &$response)
Auth_OpenID_ServerResponse handleRequest (Auth_OpenID_Request $request)
void openid_associate ( &$request)
void openid_check_authentication ( &$request)
Methods
Constructor Auth_OpenID_Server (line 1674)
Auth_OpenID_Server Auth_OpenID_Server ( &$store, [ $op_endpoint = null])

- &$store
- $op_endpoint

decodeRequest (line 1747)

Decodes a query args array into the appropriate Auth_OpenID_Request object.

void decodeRequest ([ $query = null])

- $query

encodeResponse (line 1738)

Encodes as response in the appropriate format suitable for sending to the user agent.

void encodeResponse ( &$response)

- &$response

handleRequest (line 1695)

Handle a request. Given an Auth_OpenID_Request object, call the appropriate Auth_OpenID_Server method to process the request and generate a response.

- return: A response object capable of generating a user-agent reply.

Auth_OpenID_ServerResponse handleRequest (Auth_OpenID_Request $request)

- Auth_OpenID_Request $request: An Auth_OpenID_Request returned by Auth_OpenID_Server::decodeRequest().

openid_associate (line 1715)

The callback for 'associate' messages.

void openid_associate ( &$request)

- &$request

openid_check_authentication (line 1707)

The callback for 'check_authentication' messages.

void openid_check_authentication ( &$request)

- &$request

Documentation generated on Tue, 21 Apr 2009 11:31:32 -0700 by phpDocumentor 1.3.2