cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Fiol Bonnín <antonio.f...@gmail.com>
Subject Re: Trying to implement two-phase authentication with flow
Date Wed, 14 Dec 2005 14:52:12 GMT
2005/12/13, Stan Dyck <sgd@standyck.com>:
> The question is how to do a lookup for the content of the second page
> after the sendPageAndWait call in my flowscript. My script calls the
> login method on an AuthenticationManager to verify authentication. I use
> this as my check for passing onto the second phase, so I figured that
> I'd have an authentication context that I could pull data from. But I
> can't figure out how to access this context (or any other, for that
> matter) from within a flowscript.

Not sure if it may help, but I have this code on my app, and it is working.

...
    var contextMan =
cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.ContextManager.ROLE);
    var authContext = contextMan.getContext("authentication");
    if(authContext!=null) {
        var userFrag = authContext.getXML("/authentication/ID");
        var username =
Packages.org.apache.cocoon.xml.dom.DOMUtil.getValueOfNode(userFrag);
        // Obtenemos la informacion de permisos de la sesión
        var userData = authContext.getXML("/authentication/data/permisos");
...

HTH,

--
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message