cziegeler 2003/10/24 00:22:27
Modified: src/documentation/xdocs/developing/webapps
authentication.xml
Log:
Adding more information about using a class
Revision Changes Path
1.6 +24 -0
cocoon-2.1/src/documentation/xdocs/developing/webapps/authentication.xml
Index: authentication.xml
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/documentation/xdocs/developing/webapps/authentication.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- authentication.xml 21 Oct 2003 12:39:15 -0000 1.5
+++ authentication.xml 24 Oct 2003 07:22:26 -0000 1.6
@@ -234,6 +234,10 @@
<li>A java class.
</li>
</ul>
+ <p>The first two are actually similar as in both cases a URI is
called. So we
+ will talk about them in the next chapter. Authentication using a
java class
+ is the topic of the following chapter.</p>
+ <s3 title="Using a URI as the authentication resource">
<p>Using this flexible approach nearly any kind of authentication is
possible (e.g. database, LDAP). The <em>authentication
resource</em> is another
mandatory configuration of the authentication handler:</p>
@@ -287,6 +291,26 @@
chapter).</p>
<note>It is advisable to make an internal pipeline for the
<em>authentication resource</em>.
An internal pipeline is not directly accessible by a user.</note>
+ </s3>
+ <s3 title="Using a Java class as the authentication resource">
+ <p>Using a class is an alternative for using a pipeline.
+ You can define this class in the handler configuration as an
attribute
+ <em>authenticator</em> of the <em>authentication</em> element,
e.g.:</p>
+ <source><autentication-manager>
+ <handlers>
+ <!-- Now follows the handlers configuration -->
+ <handler name="portalhandler">
+ <!-- The login resource -->
+ <redirect-to uri="cocoon:/sunspotdemoportal"/>
+ <authentication authenticator="mypkg.MyAuthenticator"/>
+ </handler>
+ </handlers>
+</autentication-manager></source>
+ <p>This class must conform to the <em>Authenticator</em>
interface. This
+ interface provides a method that tries to authenticate a User
and
+ delivers XML that is stored in the session on success. So, the
behaviour
+ is similar to the pipeline.</p>
+ </s3>
</s2>
<s2 title="Logging out">
<p>The logout process is triggered by the "auth-logout"