2 Replies Latest reply on Jun 25, 2005 6:47 AM by Frank Lemke

    Servlet creates LoginContext, should be used by Web-Containe

    Frank Lemke Newbie

      Hi,

      javas.security.auth.login.LoginContext lc;
      AppCallbackHandler ach; // just like in Scott's Jaas-Tutorial...
      
      ach = new AppCallbackHandler(composedUserName, password.toCharArray());
      
      lc = new LoginContext("plebs", ach);
      
      lc.login();
      


      This code works well in a servlet. The login-context (last line) contains data for the principal and its roles. Is it possible to let the web-container further on use these principal-data to authenticate the user? I don't think so, because I can't give the login-context or principals to the web-container. Or am I wrong?