1 Reply Latest reply on Nov 26, 2010 10:37 AM by karel cech

    Extend indentity

    karel cech Newbie

      Hi all, I have a problem with extending the Seam Identity...
      I followed the manual from:

      However it appears that seam does not use my Identity... Any ideas what it could be? I did full clean, deleted any folder that might contain some elder deploys...

      I use seam 2.2 and JBoss 5.1 (unfortunately have to use this versions)

      package company.scm.security;
      import java.util.HashMap;
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Install;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.annotations.Startup;
      import org.jboss.seam.annotations.intercept.BypassInterceptors;
      import org.jboss.seam.log.LogProvider;
      import org.jboss.seam.log.Logging;
      import org.jboss.seam.security.Identity;
      import static org.jboss.seam.annotations.Install.APPLICATION;
      @Install(precedence = APPLICATION)  
      public class SCMIdentity extends Identity {
           private static final long serialVersionUID = 1L;
           private static final LogProvider log = Logging.getLogProvider(SCMIdentity.class);
           private HashMap<String, Boolean> permissions;
           private String userRole;
           PermissionGranter permissionGranter;
           public String login() {
                System.out.println("CUSTOM LOGIN CALLED");
                String loginString;
                loginString = super.login();
                     userRole = permissionGranter.getUserRole(getCredentials().getUsername());
                     permissions = permissionGranter.getPermissionsList(userRole);
                return loginString;

      Of course the line CUSTOM LOGIN CALLED never gets printed... Should I check configuration somewhere?
      Thanks in advance for any ideas!