-
1. Re: Wildfly 8.2.0.Final HttpRequest.getAuthType() and HttpRequest.getRemoteUser() return null in servlets
swd847 Feb 17, 2015 4:07 AM (in response to gerry.matte)1 of 1 people found this helpfulHow are you performing authentication?
-
2. Re: Wildfly 8.2.0.Final HttpRequest.getAuthType() and HttpRequest.getRemoteUser() return null in servlets
gerry.matte Feb 17, 2015 10:03 AM (in response to swd847)BASIC authentication configured in Web. Xml
The wildfly security domain uses the same DatabaseLoginModule I used with JBoss AS7.1
With AS7, the behaviour was identical before I went to protected pages and authenticated. After I did so, AuthType displayed BASIC and RemoteUser showed the user name.
-
3. Re: Wildfly 8.2.0.Final HttpRequest.getAuthType() and HttpRequest.getRemoteUser() return null in servlets
gerry.matte Feb 19, 2015 6:22 PM (in response to swd847)It took me a while to realise that your question was key to the symptoms I was seeing.
The methods used in my SnoopServlet program to retrieve AuthType and RemoteUser only worked when I was using FORM based authentication [or more accurately those method calls failed with BASIC authentication]
When I realised my former Jboss AS 7.1.1.Final implemented the webapp's security using a login form and I changed my Wildfly webapp to also use a login form, the output is now:
request properties (methods of the HttpRequest):
Request Is Secure: false
Auth Type: FORM
HTTP Method: GET
Remote User: xxx@gerrymate.ca
Request URI: /JbossTests7/SnoopServlet
Context Path: /JbossTests7
Servlet Path: /SnoopServlet
Path Info: null
Path Trans: null
Query String: null
Thanks for taking time to reply Stuart.
-
4. Re: Wildfly 8.2.0.Final HttpRequest.getAuthType() and HttpRequest.getRemoteUser() return null in servlets
swd847 Feb 19, 2015 8:10 PM (in response to gerry.matte)Either way, it should still work with basic auth. It would be good to understand why it was not, as it sounds like a bug.