Author: buildbot Date: Sun Apr 22 18:28:57 2012 New Revision: 813989 Log: Staging update by buildbot for sling
Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/authentication---framework.html Propchange: websites/staging/sling/trunk/content/ ------------------------------------------------------------------------------ --- cms:source-revision (original) +++ cms:source-revision Sun Apr 22 18:28:57 2012 @@ -1 +1 @@ -1328924 +1328925 Modified: websites/staging/sling/trunk/content/authentication---framework.html ============================================================================== --- websites/staging/sling/trunk/content/authentication---framework.html (original) +++ websites/staging/sling/trunk/content/authentication---framework.html Sun Apr 22 18:28:57 2012 @@ -225,10 +225,9 @@ specific to convey the JCR Session to th versions of the Sling Commons Auth bundle, this request attribute will not be present anymore. To get the JCR Session for the current request adapt the request's resource resolver to a JCR Session:</p> -<div class="codehilite"><pre><span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">getResourceResolver</span><span class="p">()</span><span class="o">.</span><span class="n">adaptTo</span><span class="p">(</span><span class="n">Session</span><span class="o">.</span><span class="n">class</span><span class="p">);</span> -</pre></div> - - +<p>~~~~~~ +Session session = request.getResourceResolver().adaptTo(Session.class); +~~~~~~</p> <p><a name="Authentication-Framework-AnonymousLogin"></a></p> <h4 id="anonymous-login">Anonymous Login</h4> <p>The <em>SlingAuthenticator</em> provides high level of control with respect to @@ -294,22 +293,10 @@ path at all are not called.</li> is assumed credentials have been requested from the client.</li> </ol> <p>The <em>login</em> method has three possible exit states:</p> -<table> -<tr><th> Exit State </th><th> Description </th></tr> -<tr><td> Normal </td><td> An *AuthenticationHandler* could be selected to which the -login request could be forwarded. </td></tr> -<tr><td> *NoAuthenticationHandlerException* </td><td> No *AuthenticationHandler* could -be selected to forward the login request to. In this case, the caller can -proceed as appropriate. For example a servlet, which should just login a -user may send back a 403/FORBIDDEN status because login is not possible. Or -a 404/NOT FOUND handler, which tried to login as a fallback, may continue -and send back the regular 404/NOT FOUND response. </td></tr> -<tr><td> *IllegalStateException* </td><td> The response has already been committed and -the login request cannot be processed. Normally to request login, the -current response must be reset and a new response has to be prepared. This -is only possible if the request has not yet been committed. </td></tr> -</table> - +<p>|| Exit State || Description || +| Normal | An <code>AuthenticationHandler</code> could be selected to which the login request could be forwarded. | +| <code>NoAuthenticationHandlerException</code> | No <code>AuthenticationHandler</code> could be selected to forward the login request to. In this case, the caller can proceed as appropriate. For example a servlet, which should just login a user may send back a 403/FORBIDDEN status because login is not possible. Or a 404/NOT FOUND handler, which tried to login as a fallback, may continue and send back the regular 404/NOT FOUND response. | +| <code>IllegalStateException</code> | The response has already been committed and the login request cannot be processed. Normally to request login, the current response must be reset and a new response has to be prepared. This is only possible if the request has not yet been committed. |</p> <p><strong>logout</strong> 1. Select one or more <em>AuthenticationHandler</em> for the request according to the request URL's scheme and authorization part.