I've set up a web application with the authentication framework (thank you Jens Maukisch for your help!).
I've still one little problem that I cannot solve:
When I do a correct login I enter the "Home page" where there is some personalized data. The problem occurs in two cases:
1) the user goes back to the login page (for example with the back button of the browser) and redoes the login (even with another username). Even if the username/password are correct he gets an error.
2) the user tries to reload the Home page (Reload button of the browser). The browser asks for re-sending the information to the server, and if you choose OK, you get an error.
In both cases the error is the same: User is already authenticated using handler: myHandler.
I know this is correct: the session is already assigned to a user, but this behaviour maybe is not good for the user.
How can I prevent this behaviour?
Thanks in advance, best regards, Nesto
This is a piece of my sitemap:
<authentication-manager>
<handlers>
<handler name="myHandler">
<redirect-to uri="cocoon:/auth/not-authorized.htm"/>
<authentication uri="cocoon:raw:/my-sunrise-authuser"/>
</handler>
</handlers>
</authentication-manager>
</map:component-configurations>
<map:pipeline internal-only="true">
<map:match pattern="my-sunrise-authuser">
<map:generate type="serverpages" src="XSP/auth/users.xsp"/>
<map:transform src="transforms/auth/sunrise-user.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
<map:pipeline>
<!-- a matcher for a login page exists (a static page in which there is a form that sends the data to the "my-auth" pipeline below) -->
<map:match pattern="my-auth">
<map:act type="auth-login">
<map:parameter name="handler" value="myHandler"/>
<map:parameter name="parameter_name" value="{request-param:user}"/>
<map:parameter name="parameter_password" value="{request-param:password}"/>
<map:redirect-to uri="cocoon:/home.htm"/>
</map:act>
<map:read src="static/auth/login-incorrect.htm"/>
</map:match>
<map:match pattern="home.htm">
<map:act type="auth-protect">
<map:parameter name="handler" value="myHandler"/>
<map:generate type="serverpages" src="XSP/userInfo.xsp"/>
<map:transform src="transforms/home.xsl"/>
<map:serialize type="xhtml"/>
</map:act>
</map:match>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
