hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Chen <jc...@centor.com>
Subject authenticate problem
Date Wed, 02 Jun 2004 22:06:46 GMT
I have an application that requires authentication.  I user a timer to
schedule a task that will access the same application through httpClient.  I
am surprised to see the following statement did pass the authentication: 

client.getState().setCredentials (null,new UsernamePasswordCredentials());

1. Can anybody explain why?  
2. I did a little experiement - if I don't call authenticate(), then the
client.executeMethod(new PostMethod(http://myapp.com/myapp)) will fail
becaue no credentials available for realm x at host xxx.  However, if I call
authenticate(), even to authenticate empty credential with null realm, I get
pass for the next client.executeMethod(...).  
Why can I get authenticated on realm x while I only did authentication for



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message