Having problems implementing a custom challenge scheme with an 
AuthenticatorHelper. I've read the documentation but I am still receiving this 
WARNING in the logs:

WARNING: Couldn't find any helper support the HTTP_MYSCHEME challenge scheme.

This is what I'm doing code-wise...

public class MyAuthenticatorHelper extends 
org.restlet.engine.security.AuthenticatorHelper 
{

        public static final ChallengeScheme MYSCHEME = 
        new ChallengeScheme(
                        "MYSCHEME", 
                        "MYSCHEME", 
                        "A custom challenge authentication scheme.");
        
        public MyAuthenticatorHelper() 
        {
                super(MYSCHEME, false, true);
        }
        
        @Override
        public void formatRawRequest(ChallengeWriter cw, 
                                                                 
ChallengeRequest cr, 
                                                                 Response 
response, 
                                                                 
Series<Parameter> httpHeaders) throws IOException
                                                                
        {
                if (cr.getRealm() != null)
                        cw.appendQuotedChallengeParameter("realm", 
cr.getRealm());
        }
        
        @Override
        public void parseResponse(ChallengeResponse cr, 
                                                          Request request, 
                                                          Series<Parameter> 
httpHeaders)
        {
                
cr.setRawValue(request.getChallengeResponse().getRawValue().replaceFirst("token=",
 ""));
        }
}

Then to the Component I am adding this line:

Engine.getInstance().getRegisteredAuthenticators().add(new 
MyAuthenticatorHelper());

Why isn't it seeing ny helper?

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2756279

Reply via email to