cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens>
Subject Re: authentication-manager and application load
Date Thu, 19 Aug 2004 06:43:21 GMT
I've just tried a little test (I never worked with applications in 
authentication before)
This does work fine:

sitemap snippets:
                    <handler name="AuthenticationHandler">
                        <redirect-to uri="cocoon:/login.html"/>
                        <authentication uri="cocoon:raw:/authenticate"/>
                            <application name="apptest">
                                <load uri="cocoon:/test.xml"/>

            <map:match pattern="test.xml">
                <map:generate src="test.xml"/>
                <map:serialize type="xml"/>

            <map:match pattern="**">
                <map:act type="auth-protect">
                    <map:parameter name="handler" 
                    <map:parameter name="application" value="apptest"/>

the application file that's loaded with first match:
<?xml version="1.0" encoding="utf-8" ?>

Inside the protected area I used an xsp to quickly get the session content:
String test = <xsp-session-fw:getxml context="authentication" 
                            if ((test != null) &amp;&amp; (test != ""))

This gave me the "data" string correctly on my page.
If you need to know how the full session context authentication looks 
like, just do this:
    String test = <xsp-session-fw:getxml context="authentication" 
Then (if you have your logs set correctly to debug, not error) there 
should be an entrance in your core.log file that shows something like:

DEBUG   (2004-08-19) 08:29.57:029   [core.session-manager] 
http8080-Processor3/DefaultSessionManager: BEGIN getContextFragment 
name=authentication, path=/
DEBUG   (2004-08-19) 08:29.57:029   [core.session-manager] 
http8080-Processor3/DefaultContextManager: BEGIN getContext 
DEBUG   (2004-08-19) 08:29.57:029   [core.session-manager] 
http8080-Processor3/DefaultContextManager: END getContext 
DEBUG   (2004-08-19) 08:29.57:039   [core.session-manager] 
http8080-Processor3/DefaultSessionManager: END getContextFragment 
documentFragment=<?xml version="1.0" encoding="UTF-8"?>

Hope this works for you.

Kind regards,
Jan wrote:

>Hello Jan,
>JH> Getting, setting and saving application information
>JH> Analogue to the access of the authentication data a resource can access
>JH> its application data:
>JH> <session:getxml context="authentication" path="/application/username"/>
>JH> <session:setxml context="authentication" 
>JH> path="/application/shoppingcart"><item1/><item2/></session:setxml>
>JH> The path underlies the same restrictions and rules as always, but it has
>JH> to start with "/application/".
>Thanks. OK load data should be in authentication context but it isn't
><handler name="warsztat-auth">
>                                                <redirect-to uri="cocoon://warsztat/users/login.html"/>
>                                                <authentication uri="cocoon:raw:/authenticate"/>
>                                                <applications>
>                                                        <application name="gdpl">
>                                                                <load uri="cocoon:/LoadUser"/>
>                                                        </application>
>                                                </applications>
>                                        </handler>
>LoadUser creates correct xml and is called for sure (changing pipeline
>name causes error on login). But nothing producet by this pipeline is found
>in authentication context. Help!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message