Hello Martin,
You need an AuthenticatorHelper to setup the ChallengeScheme. There is no
default helper for HTTP_Cookie. The helper should setup the challengeresponse
so it can be verified by the verifier.
The helper can be installed by adding a file named
org.restlet.engine.security.AuthenticatorHelper in the folder
META-INF/services. The contents should contain the fully qualified javaname of
the Helper.
Restlet will discover the helper and make it available to the engine.
The helper should look something like:
public class CookieSchemeHelper extends AuthenticatorHelper{
public CookieSchemeHelper () {
super(HTTP_Cookie, true, true);
}
@Override
public void parseResponse(ChallengeResponse challenge, Request
request,Series<Parameter> httpHeaders) {
String identifier = fromCookie();
String secret = fromCookie();
challenge.setIdentifier(identifier);
challenge.setSecret(secret);
}
}
The main problem is that setting the Authorization header using a httppost from
a form is not possible. You can use a requestparameter and use a Filter to set
the correct HTTP attribute on the request.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2931824