[jboss-user] [Security & JAAS/JBoss] - question about custom login module and principal

kgoedert do-not-reply at jboss.com
Thu Jul 10 09:40:42 EDT 2008


Hello, 

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");
  |          
  |          System.out.println(talk.sayHello());
  | 

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?

Thanks 

Kelly

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163613#4163613

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163613



More information about the jboss-user mailing list