1 Reply Latest reply on Jul 10, 2008 12:22 PM by kelly goedert

    question about custom login module and principal

    kelly goedert Apprentice


      I'm creating a custom login module and principal based on the references of jboss wiki. When a client tries to access my beans I use the following:

       env.setProperty(Context.SECURITY_PRINCIPAL, "user");
       env.setProperty(Context.SECURITY_CREDENTIALS, "pass");
       env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
       Context context = new InitialContext(env);
       ISayHello talk = (ISayHello) context.lookup("myapp/ejb/SayBean");

      And it works fine. But, I would like to have something that allows the user to inform if he would like to log as an administrator or as a regular user. Is it possible? How could I do that?