-
1. Re: How to support two login page
keithnaas Mar 13, 2008 2:33 PM (in response to coolstone)Shawn,
You could have one login page, and have it forward to the two separate login pages based on the value of some property. Or you could have one login page, and toggle between the two modes based on a user action.
Then if you want two different authenticate methods, you could simply extend the Identity object and add the extra functionality to authenticate differently for the two different screens.
To tell Seam to use your Identity object, make sure to add the Identity's @Name annotation to your object. This worked in Seam 1.2.1.GA.
@Name("org.jboss.seam.security.identity")
I'm sure you'll encounter some roadblocks along the way, but this should get your started.
Good luck,
Keith -
2. Re: How to support two login page
coolstone Mar 17, 2008 3:52 AM (in response to coolstone)Thank you, Keith.
Here comes another problem:when the method 'authenticator.authenticate' invokes?
<security:identity authenticate-method="#{authenticator.authenticate}"/>
i notice that in the login page, only the method 'identity.login' is been invoked.
<h:commandButton class="Button" width="80px" value="Login" action="#{identity.login}" />
can we control when to invoke the authenticate method?
Shawn Young
-
3. Re: How to support two login page
keithnaas Mar 17, 2008 3:56 PM (in response to coolstone)If you look at the Identity component, you can see when and why the authenticate method is invoked.
If you have a good enuf reason, I'm sure you can change things how you want. However, most of that stuff works really well OOTB so it should be a pretty compelling reason.
-
4. Re: How to support two login page
coolstone Mar 18, 2008 2:02 AM (in response to coolstone)Thank you very much! Keith.
I extend the org.jboss.seam.security.identity, and everything goes well now.
In our application, we should support the CA(Certificate Authority) login...Thank you for your help!