Stavros Kounis wrote:
On 5/19/05, Guido Casper <[EMAIL PROTECTED]> wrote:
Stavros Kounis wrote:
hi all
i try to use Auth-FW. i have choose to create one just like the flow based in cocoon's samples.
The auth process work fine (i can login log-out etc) but i can not get loged-in user's information.
I have try the code snippet from AuthFWWithFlow wiki page [1]
.... 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); ...
this code return NULL at contextMan.getContext("authentication").
I have to note that when i add this snippet at original cocoon's sample work fine.
Did anyone give me a hint where i have to look for?
The authentication context is only available within sitemap sections being protected via AuthAction.
hi Guido and thank you for your reply
now i have to say that i'm totaly confused because i have try previews snippet in flow based auth-fw example (succesfully, or i just think so?!?).
Sorry, I use above code snippet together with action based approach. But it should be possible with flow-based as well (as you confirmed).
All I can say is that you should look for differences between your code and the Cocoon sample (sorry :-).
I just had a quick look at the AuthAction, which code snippet may be responsible for making the auth context available and I think it's this:
RequestState state = authManager.getState(); map = state.getHandler().getContext().getContextInfo();
which, I assume, places the auth info into the request and which I can't find in the flow based sample.
HTH Guido
So there is NO way to get loged-in user-name in flow ? I have to use the action based approach ONLY?
regards
--stavros
-- Freundliche Gr��e / With kind regards Guido Casper
S&N AG Competence Center Open Source Klingenderstr. 5 D 33100 Paderborn
voice +49 5251/1581-87 fax +49 5251/1581-71 eMail [EMAIL PROTECTED] Web http://www.s-und-n.de
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
