cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Created: Installation
Date Sat, 13 Jan 2007 20:58:22 GMT
A new document has been created.

http://cocoon.zones.apache.org/daisy/documentation/1315.html

Document ID: 1315
Branch: main
Language: default
Name: Installation
Document Type: Cocoon Document
Created: 1/13/07 8:58:02 PM
Creator (owner): Carsten Ziegeler
State: draft

Parts
=====

Content
-------
Mime type: text/xml
Size: 3504 bytes
Content:
<html>
<body>

<p>Installing Cocoon Auth in Cocoon is very easy, just drop the Cocoon Auth jar
file into Cocoon (WEB-INF/lib) and that's it (or add a dependency to your Maven
descriptor).</p>

<p>The first task you have to do is to configure Cocoon Auth's application
manager. By default the following bean configuration is read on startup of
Cocoon:</p>

<pre> &lt;!-- CoWarp's application manager: --&gt;
  &lt;bean name="org.apache.cocoon.auth.ApplicationManager" 
             class="org.apache.cocoon.auth.StandardApplicationManager"
  scope="singleton"/&gt;
</pre>

<h2>Sitemap Components</h2>

<p>Cocoon Auth comes with several sitemap components that are very useful. The
following three actions are available in your Cocoon application. There is no
need to configure them.</p>

<pre>
      &lt;map:action name="cauth-is-logged-in"
                  src="org.apache.cocoon.auth.acting.LoggedInAction"/&gt;
      &lt;map:action name="cauth-login"
                  src="org.apache.cocoon.auth.acting.LoginAction"/&gt;
      &lt;map:action name="cauth-logout"
                  src="org.apache.cocoon.auth.acting.LogoutAction"/&gt;
</pre>

<h2>Updating from the authentication-fw block</h2>

<pre> </pre>

<p>If you're already using the Cocoon authentication-fw block and want to update
to Cocoon Auth, you can take the following steps as a starting point. However,
depending on your application, there might be additional things you have to take
care of!</p>

<pre> </pre>

<p>In general, the authentication-fw block only supports the notion of a
security handler (applications are possible but very rarely used). As Cocoon
Auth is build around the notion of an application with an attached security
handler, you need to configure both: a security handler and an application:</p>

<pre> </pre>

<pre> </pre>

<pre> </pre>

<p>Configure a security handler that uses a pipeline for authenticating the user
and configure the pipeline - this is the same pipeline you are using with the
authentication-fw.</p>

<pre> </pre>

<p>Then configure an application that uses the standard implementation and give
the previously created handler as a configuration value.</p>

<pre> </pre>

<p>The next step is to change the usage of the actions - the authentication-fw
block uses a set of actions starting with the prefix "auth-".</p>

<pre> </pre>

<h3>Login action</h3>

<pre> </pre>

<p>You can simply change the usage of the <em>auth-login</em> action to
<em>cauth-login</em>. Rename the parameter <em>handler</em> to
<em>application</em> and set the value to your previously created application.
</p>

<pre> </pre>

<h3>Logout action</h3>

<pre> </pre>

<p>You can simply change the usage of the <em>auth-logout</em> action to
<em>csuth-logout</em>. Rename the parameter <em>handler</em> to
<em>application</em> and set the value to your previously created application.
</p>

<pre> </pre>

<h3>Protect Action</h3>

<pre> </pre>

<p>You can simply change the usage of the <em>auth-protect</em> action to
<em>cauth-is-logged-in</em>. Rename the parameter <em>handler</em>
to
<em>application</em> and set the value to your previously created application.
</p>

<pre> </pre>

<h3>IsLoggedIn Action</h3>

<pre> </pre>

<p>You can simply change the usage of the <em>auth-isloggedin</em> action
to
<em>cauth-is-logged-in</em>. Rename the parameter <em>handler</em>
to
<em>application</em> and set the value to your previously created application.
</p>

<pre> </pre>

<pre> </pre>

</body>
</html>

Collections
===========
The document belongs to the following collections: cdocs-auth

Mime
View raw message