Using Cocoon 2.2 RC2 and the Cocoon Authentication block.

 

First the sitemap uses 

 

<map:act type="cauth-is-logged-in">

    <map:parameter name="application" value="Sublima"/>

    [...]

</map:act>

<map:redirect-to uri="{request:contextPath}/login"/>

 

To check if the user is logged in.

 

The user logs in and we use a Java class that extends
AbstractSecurityHandler to do the username/password check and that
returns a User object.

We can set additional attributes to this User object using
User.setAttribute(key, value) and we want to do this to control which
role the user has.

 

In the other Java code we use the ApplicationManager to see if the user
is logged in, by calling ApplicationManager.isLoggedIn("Sublima").

 

How do we get the User object that were created upon login? We can't
find any methods in ApplicationManager that returns User.

 

- Magnus


IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.

Reply via email to