Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Seam's Identity and Authenticator

scott.stark@jboss.org

2007-05-03


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.