Support Joomla!

Packages

Package: OpenID

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 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 /openid/Auth/OpenID/Server.php (line 1679)

Class Auth_OpenID_Server
Method Summary
Constructor Auth_OpenID_Server Auth_OpenID_Server ( &$store, [ $op_endpoint = null])
Method void decodeRequest ([ $query = null])
Method void encodeResponse ( &$response)
Method void openid_associate ( &$request)
Method void openid_check_authentication ( &$request)
Methods
Constructor Auth_OpenID_Server (line 1680)
Auth_OpenID_Server Auth_OpenID_Server ( &$store, [ $op_endpoint = null])
  • &$store
  • $op_endpoint
decodeRequest (line 1753)

Decodes a query args array into the appropriate Auth_OpenID_Request object.

void decodeRequest ([ $query = null])
  • $query
encodeResponse (line 1744)

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

void encodeResponse ( &$response)
  • &$response
handleRequest (line 1701)

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.
openid_associate (line 1721)

The callback for 'associate' messages.

void openid_associate ( &$request)
  • &$request
openid_check_authentication (line 1713)

The callback for 'check_authentication' messages.

void openid_check_authentication ( &$request)
  • &$request

Documentation generated on Sat, 14 Nov 2009 11:18:50 +0000 by phpDocumentor 1.3.1