tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Small <>
Subject Cant get realm working, Authentication header seems to be null.
Date Mon, 05 Nov 2001 19:40:49 GMT
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[]: Username null NOT successfully

I added a little bit more logging to 

        // 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?



To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message