サーバー側でユーザーを認証するために、Restletsの「ChallengeResponse」メカニズムを使用しています。
ChallengeResponse challengeResponse = getRequest().getChallengeResponse();
if( challengeResponse == null ){
throw new RuntimeException("not authenticated");
}
String login = challengeResponse.getIdentifier();
String password = new String(challengeResponse.getSecret());
私の理解では、「ChallengeResponse」では、ユーザー名とパスワードをヘッダーに入れる必要があります。ただし、クライアントは次のように資格情報を URL に入れる必要があります。
https://username:password@www.myserver.com/my_secure_document
実際に送信されたものを見てみると、パスワードは Base64 でエンコードされているようです
クライアントは、ヘッダーの代わりに URL を介して認証情報を送信する外部 Web サービス (Twilio) です。
Restlet を使用してこの方法で認証する適切な方法は何ですか?