[jboss-user] [JBoss Seam] - Seam's Identity and Authenticator
tonylmai
do-not-reply at jboss.com
Thu May 3 21:21:17 EDT 2007
Can someone tell me the correlation between Seam's Identity and Authenticator?
It is my understanding that we can declare/override the RuleBasedIdentity as followed:
@Name("org.jboss.seam.security.identity")
| @Scope(ScopeType.SESSION)
| @Intercept(InterceptionType.AFTER_RESTORE_VIEW)
| public class MyIdentity extends RuleBasedIdentity {
| ...
| @Override
| public String login() {
| super.login(); /* Ignore outcome from super */
|
| ...
| return "nextPage";
| }
And use it in our web page as followed:
<h:commandButton value="Login" action="#{identity.login}"/>
|
Then I also see code using Authenticator as followed:
component.xml
<security:identity authenticate-method="#{authenticator.authenticate}" security-rules="#{securityRules}"/>
with
@Name("authenticator")
| public class Authenticator {
| @In
| Identity identity;
|
| public boolean authenticate() {
| ...
| return true;
| }
|
Is there an implicit correlation between these two component? Or are they mutually exclusive? Is one better than the other?
Thanks for your help.
-tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043050#4043050
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043050
More information about the jboss-user
mailing list