You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Small <ms...@Clickability.com> on 2001/11/05 20:40:49 UTC
Cant get realm working, Authentication header seems to be null.
I am trying to get a Memory Realm working but for some reason my
Authentication header is being read as null. I am using Basic
authentication. I get the login dialog box to pop up just fine but after I
enter the user and pwd, the info does not seem to have been passed to the
server. I was only able to find this after turning all logging on and I got
a log line reading:
MemoryRealm[tomcat.azaghal.com]: Username null NOT successfully
authenticated
I added a little bit more logging to BasicAuthenticator.java
// Validate any credentials already included with this request
HttpServletRequest hreq =
(HttpServletRequest) request.getRequest();
HttpServletResponse hres =
(HttpServletResponse) response.getResponse();
String authorization = request.getAuthorization();
if (debug >= 1)
log("AUTH: " + authorization);
String username = parseUsername(authorization);
String password = parsePassword(authorization);
if (debug >= 1)
log("Username: " + username + ", password: " + password);
principal = context.getRealm().authenticate(username, password);
And now I get the log lines:
authenticator[/myapp]: AUTH: null
Authenticator[/myapp]: Username: null, password: null
So it looks like the Authentication header is not available in the Request.
Anybody know why?
Thanks
Matt
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>