tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Small <msm...@Clickability.com>
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[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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message