123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- <?xml version="1.0" encoding="iso-8859-1"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- template designed by Marco Von Ballmoos -->
- <title>Docs For Class Auth_OpenID_Server</title>
- <link rel="stylesheet" href="../media/stylesheet.css" />
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
- </head>
- <body>
- <div class="page-body">
- <h2 class="class-name">Class Auth_OpenID_Server</h2>
- <a name="sec-description"></a>
- <div class="info-box">
- <div class="info-box-title">Description</div>
- <div class="nav-bar">
- <span class="disabled">Description</span> |
- <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
-
- </div>
- <div class="info-box-body">
- <!-- ========== Info from phpDoc block ========= -->
- <p class="short-description">I handle requests for an OpenID server.</p>
- <p class="description"><p>Some types of requests (those which are not checkid requests) may be handed to my <a href="../OpenID/Auth_OpenID_Server.html#methodhandleRequest">handleRequest</a> method, and I will take care of it and return a response.</p><p>For your convenience, I also provide an interface to <a href="../OpenID/Auth_OpenID_Decoder.html#methoddecode">Auth_OpenID_Decoder::decode()</a> and <a href="../OpenID/Auth_OpenID_SigningEncoder.html#methodencode">Auth_OpenID_SigningEncoder::encode()</a> through my methods <a href="../OpenID/Auth_OpenID_Server.html#methoddecodeRequest">decodeRequest</a> and <a href="../OpenID/Auth_OpenID_Server.html#methodencodeResponse">encodeResponse</a>.</p><p>All my state is encapsulated in an <a href="../OpenID/Auth_OpenID_OpenIDStore.html">Auth_OpenID_OpenIDStore</a>.</p><p>Example:</p><p><pre> $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);</pre></p></p>
- <p class="notes">
- Located in <a class="field" href="_Auth---OpenID---Server.php.html">/Auth/OpenID/Server.php</a> (line <span class="field">1673</span>)
- </p>
-
-
- <pre></pre>
-
- </div>
- </div>
- <a name="sec-method-summary"></a>
- <div class="info-box">
- <div class="info-box-title">Method Summary</span></div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
- </div>
- <div class="info-box-body">
- <div class="method-summary">
-
- <div class="method-definition">
- <span class="method-result">Auth_OpenID_Server</span>
- <a href="#Auth_OpenID_Server" title="details" class="method-name">Auth_OpenID_Server</a>
- (<span class="var-type"></span> <span class="var-name">&$store</span>, [<span class="var-type"></span> <span class="var-name">$op_endpoint</span> = <span class="var-default">null</span>])
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#decodeRequest" title="details" class="method-name">decodeRequest</a>
- ([<span class="var-type"></span> <span class="var-name">$query</span> = <span class="var-default">null</span>])
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#encodeResponse" title="details" class="method-name">encodeResponse</a>
- (<span class="var-type"></span> <span class="var-name">&$response</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result"><a href="../OpenID/Auth_OpenID_ServerResponse.html">Auth_OpenID_ServerResponse</a></span>
- <a href="#handleRequest" title="details" class="method-name">handleRequest</a>
- (<span class="var-type"><a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a></span> <span class="var-name">$request</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#openid_associate" title="details" class="method-name">openid_associate</a>
- (<span class="var-type"></span> <span class="var-name">&$request</span>)
- </div>
-
- <div class="method-definition">
- <span class="method-result">void</span>
- <a href="#openid_check_authentication" title="details" class="method-name">openid_check_authentication</a>
- (<span class="var-type"></span> <span class="var-name">&$request</span>)
- </div>
- </div>
- </div>
- </div>
-
- <a name="sec-methods"></a>
- <div class="info-box">
- <div class="info-box-title">Methods</div>
- <div class="nav-bar">
- <a href="#sec-description">Description</a> |
- <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
-
- </div>
- <div class="info-box-body">
- <A NAME='method_detail'></A>
- <a name="methodAuth_OpenID_Server" id="Auth_OpenID_Server"><!-- --></a>
- <div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">Constructor Auth_OpenID_Server</span> (line <span class="line-number">1674</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
-
- <div class="method-signature">
- <span class="method-result">Auth_OpenID_Server</span>
- <span class="method-name">
- Auth_OpenID_Server
- </span>
- (<span class="var-type"></span> <span class="var-name">&$store</span>, [<span class="var-type"></span> <span class="var-name">$op_endpoint</span> = <span class="var-default">null</span>])
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"></span>
- <span class="var-name">&$store</span> </li>
- <li>
- <span class="var-type"></span>
- <span class="var-name">$op_endpoint</span> </li>
- </ul>
-
-
- </div>
- <a name="methoddecodeRequest" id="decodeRequest"><!-- --></a>
- <div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">decodeRequest</span> (line <span class="line-number">1747</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
- <p class="short-description">Decodes a query args array into the appropriate <a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a> object.</p>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- decodeRequest
- </span>
- ([<span class="var-type"></span> <span class="var-name">$query</span> = <span class="var-default">null</span>])
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"></span>
- <span class="var-name">$query</span> </li>
- </ul>
-
-
- </div>
- <a name="methodencodeResponse" id="encodeResponse"><!-- --></a>
- <div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">encodeResponse</span> (line <span class="line-number">1738</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
- <p class="short-description">Encodes as response in the appropriate format suitable for sending to the user agent.</p>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- encodeResponse
- </span>
- (<span class="var-type"></span> <span class="var-name">&$response</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"></span>
- <span class="var-name">&$response</span> </li>
- </ul>
-
-
- </div>
- <a name="methodhandleRequest" id="handleRequest"><!-- --></a>
- <div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">handleRequest</span> (line <span class="line-number">1695</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
- <p class="short-description">Handle a request. Given an <a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a> object, call the appropriate <a href="../OpenID/Auth_OpenID_Server.html">Auth_OpenID_Server</a> method to process the request and generate a response.</p>
- <ul class="tags">
- <li><span class="field">return:</span> A response object capable of generating a user-agent reply.</li>
- </ul>
-
- <div class="method-signature">
- <span class="method-result"><a href="../OpenID/Auth_OpenID_ServerResponse.html">Auth_OpenID_ServerResponse</a></span>
- <span class="method-name">
- handleRequest
- </span>
- (<span class="var-type"><a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a></span> <span class="var-name">$request</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"><a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a></span>
- <span class="var-name">$request</span><span class="var-description">: An <a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a> returned by <a href="../OpenID/Auth_OpenID_Server.html#methoddecodeRequest">Auth_OpenID_Server::decodeRequest()</a>.</span> </li>
- </ul>
-
-
- </div>
- <a name="methodopenid_associate" id="openid_associate"><!-- --></a>
- <div class="oddrow">
-
- <div class="method-header">
- <span class="method-title">openid_associate</span> (line <span class="line-number">1715</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
- <p class="short-description">The callback for 'associate' messages.</p>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- openid_associate
- </span>
- (<span class="var-type"></span> <span class="var-name">&$request</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"></span>
- <span class="var-name">&$request</span> </li>
- </ul>
-
-
- </div>
- <a name="methodopenid_check_authentication" id="openid_check_authentication"><!-- --></a>
- <div class="evenrow">
-
- <div class="method-header">
- <span class="method-title">openid_check_authentication</span> (line <span class="line-number">1707</span>)
- </div>
-
- <!-- ========== Info from phpDoc block ========= -->
- <p class="short-description">The callback for 'check_authentication' messages.</p>
-
- <div class="method-signature">
- <span class="method-result">void</span>
- <span class="method-name">
- openid_check_authentication
- </span>
- (<span class="var-type"></span> <span class="var-name">&$request</span>)
- </div>
-
- <ul class="parameters">
- <li>
- <span class="var-type"></span>
- <span class="var-name">&$request</span> </li>
- </ul>
-
-
- </div>
-
- </div>
- </div>
- <p class="notes" id="credit">
- Documentation generated on Tue, 21 Apr 2009 11:31:32 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
- </p>
- </div></body>
- </html>
|