I've been using Restlets "ChallengeResponse" mechanism to authenticate users on the server side.
ChallengeResponse challengeResponse = getRequest().getChallengeResponse();
if( challengeResponse == null ){
throw new RuntimeException("not authenticated");
}
String login = challengeResponse.getIdentifier();
String password = new String(challengeResponse.getSecret());
From my understanding, "ChallengeResponse" requires that the username and password are put into headers. However a client needs to put the credentials into the url like so:
https://username:[email protected]/my_secure_document
When I looked at what was actually sent, it looks like the password is being Base64 encoded
The client is an external web service (Twilio) who sends the authentication information via the URL instead of the headers....
What is the proper way to authenticate in this fashion using Restlet?