cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuomo L <tleso...@cc.hut.fi>
Subject RE: Authentication problems in sub-sitemap
Date Wed, 05 Nov 2003 09:06:54 GMT
I see. Thought they were passed as regular sitemap parameters (as it
is with Cocoon resources). But this is probably a better way. Thanks! :)

-Tuomo

On Wed, 5 Nov 2003, Carsten Ziegeler wrote:

> Tuomo L wrote:
> >
> > Hi,
> >
> > Is this still an issue? I can't get the LoginAction to pass through. It
> > seems that the authentication-resource is not getting the parameters from
> > LoginAction. I have in mounted sitemap:
> >
> > <map:act type="auth-login">
> >  <map:parameter name="handler" value="default"/>
> >  <map:parameter name="parameter_username"
> > value="{request-param:username}"/>
> >  <map:parameter name="parameter_password"
> > value="{request-param:password}"/>
> >  ... Passed, do something here ...
> > </map:act>
> > ... Failed, do someting else ...
> >
> > And:
> >
> > <map:match pattern="authenticator">
> >   <map:generate src="context://conf/users.xml"/>
> >   <map:transform
> > src="context://resources/stylesheets/users2authentication.xsl">
> >     <map:parameter name="username" value="{username}"/>
> >     <map:parameter name="password" value="{password}"/>
> >   </map:transform>
> >   <map:serialize type="xml"/>
> > </map:match>
> >
> >
> > It seems that {username} and {password} always return nothing. If I change
> > them to {request-param:username} and {request-param:password}, everything
> > works. But it's not a good solution, since I want to specify other
> > parameters too, coming from the LoginAction. Shouldn't the LoginAction
> > make every "parameter_*" available for the authentication
> > resource, without the
> > "parameter_" prefix? Help.
> >
> The login action invokes your authentication pipeline (authenticator)
> and passes all parameters defined at the login action to this pipeline.
> These parameters are passed as request parameters, so using
> {request-param:username} in your authenticator pipeline is the right
> way.
> If you add another parameter to your login action, e.g. a parameter
> named "app":
>
> > <map:act type="auth-login">
> >  <map:parameter name="handler" value="default"/>
> >  <map:parameter name="parameter_username"
> > value="{request-param:username}"/>
> >  <map:parameter name="parameter_password"
> > value="{request-param:password}"/>
> >  <map:parameter name="parameter_app"
> > value="myapp"/>
> >  ... Passed, do something here ...
> > </map:act>
>
> you can use it in your authenticator pipeline via
> {request-param:app} as well.
>
> Carsten
>

Mime
View raw message