//end TODO
// Guard the restlet with BASIC authentication.
ChallengeAuthenticator guard = new ChallengeAuthenticator(null, ChallengeScheme.HTTP_BASIC, "testRealm");
// Instantiates a Verifier of identifier/secret couples based on a simple Map.
guard.setVerifier(new SecretVerifier(){
@Override
public int verify(String identifier, char[] secret) {
if (getApi().getAuth().login(identifier, secret)){
return RESULT_VALID;