Hi Stephan, The simplest is to modify ServletCall#getRequestHeaders() to automatically add an "Authorization" HTTP header.
[Double check that this header is not already forwarded by the Servlet container] Then, you need to recreate the original value of the header, called the raw credentials. For that, you have access to the challenge scheme via getAuthType() and to the user's identifier via getRemoteUser(). For the password, you could try using an empty or special constant value like "unknown". Then there is a static com.noelios.restlet.authentication.AuthenticationUtils#format(ChallengeRespo nse challenge, Request request, Series<Parameter> httpHeaders) method that will do the rest of the job for you. You may have troubles with the "FORM" scheme though. We may need to add special support for that as a pluggable authentication scheme provided by the Servlet extension (not really hard). Best regards, Jerome -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : mercredi 21 mai 2008 23:29 À : [email protected] Objet : Re: read the used authentication scheme from Servlet etc. Hi Jerome, yes, I can implement it. because I'm not familiar with the connector extensions: * Is it good, to place the logic in com.noelios.restlet.ext.servlet.ServerServlet.service(..) between createCall(...) and the handling of this call? Or where should I place it? * It seems to me to be the best to set a ChallengeResponse with the authenticated identifier from the Servlet API, but no secrets. I would save in the ChallengeResponse, that the request is authenticated. Is this good, or do you (or any one else) have a better idea? * Is it right, that the credentials contains the unencrypted data, and could be ignored for this use of ChallengeResponse? Are their other server connectors supporting authentication, where I should implement the same? best regards Stephan Jerome Louvel schrieb: > Hi Stephan, > > This sounds like a useful thing to support in the Servlet adapter. > > The Servlet API allows the retrieval of the authentication type: > http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest. > html#getAuthType() > > So, it's just a matter of calling Restlet's Request#setChallengeResponse() > with the proper ChallengeScheme constant. > > Note that we don't have a constant for "FORM" authentication but we could > create a new constant specific to the Servlet adapter. > > Do you want to take a look at it? > > Best regards, > Jerome > > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Envoyé : samedi 17 mai 2008 13:27 > À : [email protected] > Objet : read the used authentication scheme from Servlet etc. > > Hi Jerome, > > Bruno told me (thanks for the detailed answer, Bruno) that I need to > request the HttpServltRequest to check, which authentication scheme is > used. So I reason, that it is not supported by Restlet now. Right? > Are there some plans to support this? A solution could be to copy the > authentication scheme in the request attributes with a given key.

