Hi,

On Mar 4, 2008, at 9:59 AM, Jahid wrote:

On server side, I am trying to set a header which will look like this ----

"ABC realm="", challenge- container="salkfadfo823w9283oinfskefn2398wenfdsk";

Can anyone tell me how can I achieve that? Here I want to mention that, I dont/can't change the challenge format. So, don't ask me to do that :), also i want the challenge to go on server side as "WWW-Authenticate" header with a
status code 201.


I'm not sure (I haven't tried it yet myself), but I think that you create a ChallengeRequest object and set it in the Response. In 1.1- M2, it seems like one way to do this would be by extending Guard and overriding the challenge method. If you are using the reference engine implementation (NRE), you could also implement com.noelios.restlet.authentication.AuthenticationHelper and register your implementation using Engine#registerAuthentication.

N.b.: like I said before, I haven't tried any of this myself yet. I just happen to be looking into implementing a custom authentication scheme today.

Rhett


Reply via email to