I am migrating Restlet from 1.2 to 2.2.3 and found out Guard is now deprecated. I started using ChallengeAuthenticator (HTTP_BASIC scheme). The issue is here, I used to extend Guard class and override the method checkSecret to authorize app specific credentials.
public class AgentAuthenticationGuard extends Guard {
public AgentAuthenticationGuard(Context context, ChallengeScheme scheme,
String realm) throws IllegalArgumentException {
super(context, scheme, realm);
}
public boolean checkSecret(Request request, String identifier, char[] secret) {
return SecurityHelper.authorizeAgent( identifier, new String(secret) );
}
}
If I want to replace Guard with ChallengeRequester, which method I should override? authenticate? how do I get identifier and secret?