[jboss-user] [JBoss Seam] - Re: Security Auto-Login Question
fernando_jmt
do-not-reply at jboss.com
Mon Feb 19 16:00:23 EST 2007
In the pages.xml add the page configuration for the first page you want to access (usually login.xhtml or home.html) and execute the login before rendering the page.
Somthing like:
| <page view-id="/login.xhtml" action="#{identity.login}">
| <navigation from-action="#{identity.login}">
| <rule if="#{identity.loggedIn}">
| <redirect view-id="/home.xhtml"/>
| </rule>
| </navigation>
| </page>
|
The above example means:
When you are trying to access to the page login.xhtml the identity.login action will be executed (same as pressing the button in the page, but without render anything yet), then your authenticator.authenticate method will be called, then if such method returns true, you will be logged in, and the next lines checks if you are logged in using the rule, and if that is true you can redirect the page you want, in this case it is reirecting the home.xhtml (of course already logged in).
HTH.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019028#4019028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019028
More information about the jboss-user
mailing list