When succesfully authenticated, a xml part should have been generated like:
<authentication>
         <ID/>
         <role/>
         <data>
            <some more fragments as you like>
         </data>
</authentication>

Context of session is "authentication"

In xsp use:
<xsp-session-fw:getxml context="authentication" path="/authentication/ID"/>;

In flow use:
var contextMan = null;
try
{
contextMan =cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.ContextManager.ROLE);
var sessionContext = contextMan.getContext("authentication");
var id = documentFragment2String(sessionContext.getXML("/authentication/ID"));
}
finally
{
cocoon.releaseComponent(contextMan);
}



It's in the same document as you found the other sentence under :(http://cocoon.apache.org/2.1/developing/webapps/authentication.html)



<snip>


Getting, setting and saving application information

Analogue to the access of the authentication data a resource can access its application data:

<session:getxml context="authentication" path="/application/username"/>
<session:setxml context="authentication"  
path="/application/shoppingcart"><item1/><item2/></session:setxml>

The path underlies the same restrictions and rules as always, but it has to start with "/application/".

</snip>

Kind Regards,
Jan


[EMAIL PROTECTED] wrote:

Hello ML users,

"On a successful authentication the framework invokes for each
application of the handler the load resource (if present). The content or result of the 
load resource is stored into the session context."

For God sake what IS THE NAME of that context. I've tried root node of
generated XML with no effect.

<authentication-manager>
                               <handlers>
                                       <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>
                               </handlers>
                       </authentication-manager>








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to