I have :
- RESTLET GWT 2.1RC1 on the client
- RESTLET J2EE 2.1RC1 on the server
I have been banging my head over this but no matter what I try :
ClientResource r = new ClientResource("/service" + UsersServiceProxy.URL);
r.setChallengeResponse(ChallengeScheme.HTTP_BASIC, "user1", "secret");
r.setOnResponse(new Uniform() {
public void handle(Request request, Response response) {
.....
}
});
r.get();
Or this code :
UserServiceProxy userService = GWT.create(UserServiceProxy.class);
userService.getClientResource().setReference(url);
userService.getClientResource().setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC, "user1", "secret"));
userService.getUser(username + ":" + password, new Result<User>() {
@Override
public void onFailure(Throwable caught) {
......
}
@Override
public void onSuccess(User user) {
.....
}
});
Problem :
On the server side no ChallengeResponse (==NULL) is received. Debugging with wireshark shows that no “Authorization:” is sent over the wire.
Using Chrome development tools I can however see that the XHR request is sent to : http://user1:secret@127.0.1.1:8888/service/user
so here, username/password are passed to the server but not as authentication header ?
How can I get access to these server side ?
Is my setup incorrect?
Is this a regression of this bug?
No authorization header sent in Restlet GWT Edition 2.1RC1, I submitted a patch that fixes at least BASIC auth so I can move on.
see http://restlet.tigris.org/issues/show_bug.cgi?id=1060