Hi all
I have been working on a Filter that implements client and server side
HTTP Negotiate and Basic authentication. The code is based on Bruno
Harbulot's nice SpnegoFilter.
Everything works fine so far. However to get the client-side
authentication working I had to change the parseAuthenticateHeader()
method in the com.noelios.restlet.authentication.AuthenticationUtils
class a bit.
The original implementation (version 1.1rc1) fails to locate the correct
AuthenticationHelper, if the realm parameter is missing in the
authenticate header, as e.g. for the Negotiate scheme.
Would it be possible to fix for this problem?
The diff for my quick fix is attached.
Best regards,
Roman
*** AuthenticationUtils.java.orig 2008-08-26 14:03:03.000000000 +0200
--- AuthenticationUtils.java 2008-08-26 14:03:22.000000000 +0200
***************
*** 225,230 ****
--- 225,234 ----
parseParameters(rest, result.getParameters());
result.setRealm(result.getParameters().getFirstValue("realm"));
+ } else {
+ final String scheme = header;
+ result = new ChallengeRequest(new ChallengeScheme("HTTP_"
+ + scheme, scheme), null);
}
}