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