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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...