Hi;

I installed the cocoon-authentication block (cocoon-2.2).
The installation looks like it was successfull, my pages
are secured and i get the login-mask as expected.

Now i want to create a flow-script, where i want to access the
current credentials (i.e. the current userId) and pass this information
to a .jx script for display.

I followed the description in

http://cocoon.apache.org/2.2/blocks/auth/1.0/1318_1_1.html

and created an initial flow script as follows:

function bookingPage() 
{
   var appMan = cocoon.getComponent(ApplicationManager.class.getName());
   if ( appMan.isLoggedIn("cocoon-app") ) 
   {
      cocoon.sendPageAndWait("booking.jx", {} );
   } 
   else
   {
      // No, not logged in
   }

}

I get a runtime error:

Caused by: org.mozilla.javascript.EvaluatorException: 
"file:///d:/booking.js", line 3: missing name after . operator
"file:///d:/booking.js", line 1: Compilation produced 1 syntax errors.

So what is wrong in this line:
var appMan = cocoon.getComponent(ApplicationManager.class.getName()); 

How to proceed ?
And then after i got this initial setup running, how would i have to call
for the userId ?
Is there something like appMan.getUserId() or similar ? Is there some
documentation about the
authentication-api available? and how the data is accessible from a
flowscript ?

thanks in advance,
regards, hussayn
-- 
View this message in context: 
http://www.nabble.com/Authentication-block%3A-how-to-access-user-credentials-from-flowscript---tp19469122p19469122.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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

Reply via email to