Hi Tim, Sorry that you lost time on this but the code isn't complete right now. This package is still under heavy design and was put in 1.2 M1 only for design feed-back.
I've put a note about that in the package Javadocs and in the release notes (blog post), but I guess this wasn't obvious enough. The good news is that we are actively working on this and that we should have a working 1.2 snapshot in the coming week. Until then, I recommend that you use the older org.restlet.Guard class. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : t...@timfleming.name [mailto:t...@timfleming.name] Envoye : mardi 27 janvier 2009 16:08 A : discuss@restlet.tigris.org Objet : Using ChallengeGuard I'm trying to use the new ChallengeGuard but must be missing something. The following code skips the guard and goes directly to the resource for http://localhost/user/1234: @Override public synchronized Restlet createRoot() { Router router = new Router(getContext()); // protected resources // -- user Router userResources = new Router(getContext()); userResources.attach("/{id}", UserResource.class); ChallengeGuard userGuard = new ChallengeGuard(getContext(), ChallengeScheme.HTTP_DIGEST, new ResourceAuthorizer()); userGuard.getAuthenticator().setVerifier(new AuthVerifier()); userGuard.setNext(userResources); router.attach("/user", userGuard); // static files File pwd = new File("."); Directory dir = new Directory(getContext(), "file:///"+pwd.getAbsolutePath()+"/"+STATIC_FILE_DIR); router.attach("/", dir); return router; } Thanks in advance. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1059214 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1060490