2 Replies Latest reply on May 3, 2007 9:49 PM by Christian Bauer

    Seam's Identity and Authenticator

    Tony Mai Apprentice

      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:

      public class MyIdentity extends RuleBasedIdentity {
       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:

      <security:identity authenticate-method="#{authenticator.authenticate}" security-rules="#{securityRules}"/>

      public class Authenticator {
       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.