I've read the following:

http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/46-restlet/112-restlet.html

But I am unable to work how I should protect the following application:

        Application app = new Application() {
            @Override
            public synchronized Restlet createInboundRoot() {
                Router router = new Router(getContext());
                router.attach(TestResource.URI, TestResourceImpl.class);
                router.attach(Test2Resource.URI, Test2ResourceImpl.class);

                return router;
            }
        };

With a single DIGEST authentication round trip on the client. At the moment I 
need to do this:

        ClientResource authResource = new 
ClientResource("http://localhost:8182/foo"; + TestResource.URI);
        TestResource myTest = authResource.wrap(TestResource.class);
        authResource.setChallengeResponse(ChallengeScheme.HTTP_DIGEST, "login",
                "secret"); 

for each and every different ClientResource; they are not transferrable as on 
the server the DIGEST authentication implementation matches on the specific 
URI. I have tried using the Directory class and implementing the Digest auth to 
guard that; but I cannot see how to setup the ChallengeResponse on the client.

Any help gratefully accepted.

regards
Steve

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

Reply via email to