A document has been updated: http://cocoon.zones.apache.org/daisy/documentation/1315.html
Document ID: 1315 Branch: main Language: default Name: Installation (unchanged) Document Type: Cocoon Document (unchanged) Updated on: 1/13/07 9:01:32 PM Updated by: Carsten Ziegeler A new version has been created, state: draft Parts ===== Content ------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 4041 bytes (previous version: 3504 bytes) Content diff: (20 equal lines skipped) following three actions are available in your Cocoon application. There is no need to configure them.</p> --- <pre> --- <map:action name="cauth-is-logged-in" +++ <pre> <map:action name="cauth-is-logged-in" src="org.apache.cocoon.auth.acting.LoggedInAction"/> <map:action name="cauth-login" src="org.apache.cocoon.auth.acting.LoginAction"/> (3 equal lines skipped) <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> +++ <bean name="org.apache.cocoon.auth.SecurityHandler/handler" +++ class="org.apache.cocoon.auth.impl.PipelineSecurityHandler" +++ scope="singleton"> +++ <property name="authenticationResource" value="cocoon:raw:/sunrise-authuser"/> +++ <property name="sourceResolver" ref="org.apache.excalibur.source.SourceResolver"/> +++ </bean> +++ <bean name="org.apache.cocoon.auth.Application/my-application" +++ class="org.apache.cocoon.auth.StandardApplication" +++ scope="singleton"> +++ <property name="securityHandler" ref="org.apache.cocoon.auth.SecurityHandler/handler"/> +++ </bean> --- <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> +++ <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> +++ <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> +++ <pre> +++ </pre> +++ <h3>Login action</h3> --- <pre> </pre> +++ <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> +++ <pre> +++ </pre> +++ <h3>Logout action</h3> --- <pre> </pre> +++ <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> +++ <pre> +++ </pre> +++ <h3>Protect Action</h3> --- <pre> </pre> +++ <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> +++ <pre> +++ </pre> +++ <h3>IsLoggedIn Action</h3> --- <pre> </pre> +++ <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> </pre> +++ </pre> </body> </html>