-
1. Re: request.getUserPrincipal null after LoginContext.login()
mhussey May 13, 2003 9:07 PM (in response to mhussey)I forgot to mention that I see this on jboss4.0_tomcat-4.1.18 and on the jboss-3.2.1_tomcat-4.1.24 bundle
-
2. Re: request.getUserPrincipal null after LoginContext.login()
mhussey May 15, 2003 8:10 PM (in response to mhussey)Sorry the description of this problem is slightly incorrect. The principal is not set to null, but rather whatever the last login was, or null if URL didn't match up with any security constraints defined in web.xml.
-
3. Re: request.getUserPrincipal null after LoginContext.login()
mhussey May 15, 2003 8:19 PM (in response to mhussey)I wrote a solution and would love it if you could make it or a derivation of it available on the mainline. This solution lets the Java code make the following static method available:
JBossServletAuthenticator.authenticate(String username, String credentials, HttpServletRequest request) throws FailedLoginException, LoginException
Instructions, source, and compiled class attached for anyone's usage.
Regards,
Michael -
4. Re: request.getUserPrincipal null after LoginContext.login()
mhussey May 20, 2003 5:40 AM (in response to mhussey)Any developers on this forum? I hate to cross post to the developer forum to make the request official, but I really think that others would be interested in this solution.
Weblogic's API is quite nice:
weblogic.servlet.security.ServletAuthentication.runAs(subject,req);