4 Replies Latest reply on Jul 14, 2004 4:48 PM by Cees Wieringen van

    ClientLoginModule works incorectly

    Eleas Newbie


      Due to this code in ClientLoginModule:

       public boolean login() throws LoginException
       if (useFirstPass == true)
       Object name = sharedState.get("javax.security.auth.login.name");
       if ((name instanceof Principal) == false)
       String username = name != null ? name.toString() : "";
       >>>>HERE!!!! loginPrincipal = new SimplePrincipal(username);
       } else

      public boolean commit() throws LoginException
       // Set the login principal and credential and subject
      >>AND HERE!!!! SecurityAssociationActions.setPrincipalInfo(loginPrincipal, loginCredential, subject);
       // Add the login principal to the subject if is not there
       Set principals = subject.getPrincipals();
       if (principals.contains(loginPrincipal) == false)
       return true;

      it is imposible to use custom Principal Class.

      Please, fix it or explain how we can use our own custom principal class with "ClientLoginModule logic"?

      Thank you!!!