Date: 2004-09-16T05:18:00
   Editor: JorgHeymans <[EMAIL PROTECTED]>
   Wiki: Cocoon Wiki
   Page: AuthFWWithFlow
   URL: http://wiki.apache.org/cocoon/AuthFWWithFlow

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -1 +1,12 @@
 "Authentication Framework with Flow" is now available as sample in your Cocoon 
installation at http://localhost:8888/samples/blocks/authentication-fw/flow/.
+
+It is also possible to setup auth using actions, and access the 
authenticationcontext from flow. Thread 
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109533577114557&w=2 offers 
the solution.
+
+In short:
+
+{{{
+var contextMan = 
cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.ContextManager.ROLE);
 
+var authContext = contextMan.getContext("authentication");
+var userFrag = authContext.getXML("/authentication/ID");
+var username = 
Packages.org.apache.cocoon.xml.dom.DOMUtil.getValueOfNode(userFrag);
+}}}

Reply via email to