5 Replies Latest reply on Mar 7, 2003 12:46 PM by Rino Ong


    Rohit Mital Newbie

      I was wondering if instead of using org.jboss.security.ClientLoginModule having to implement a CallbackHandler in my client program,can't I use Context.SECURITY_PRINCIPAL/Context.SECURITY_CREDENTIALS to send username/password? It gives me java.lang.SecurityException: Authentication exception, principal=null
      Any ideas or am I stuck to implementing a Callback handler on my client side.

      Properties p = new Properties();
      p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      p.put(Context.SECURITY_PRINCIPAL, "scott");
      p.put(Context.SECURITY_CREDENTIALS, "echoman");
      InitialContext iniContext = new InitialContext(p);
      SessionHome home = (SessionHome) iniContext.lookup(example+"/StatelessSession");