I can't seem to get ChallengeAuthenticators to work in Restlet GAE m6 when I 
have both public and protected resources.

I've created a custom class, MyAuthenticator, that extends 
ChallengAuthenticator.  Right now it simply overrides the authenticate(request, 
response) method and returns true.

Below is my createInboundRoot method.  Anyone spot an obvious mistake:

------------------------------
        @Override
        public synchronized Restlet createInboundRoot() {
                Router router = new Router(getContext());

                //public resources
                router.attach("/page/{pageName}", FreemarkerPageResource.class);
                
                // create a secure router and associate it with my custom 
authenticator
                Router secureRouter = new Router(getContext());
                secureRouter.attach("/hello", HelloWorldResource.class);
                
                MyAuthenticator authenticator = new 
MyAuthenticator(getContext(),
                                ChallengeScheme.CUSTOM, "System Authentication 
- Provide your credentials");
                authenticator.setNext(secureRouter);
                router.attach("/admin", authenticator);
                
                return router;
        }
------------------------------

When I hit the http://localhost:8080/admin url, the 
MyAuthenticator.authenticate(request, response) method does get called.  But if 
I try to hit http://localhost:8080/admin/hello I get a 404.

Thanks,
Sam

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

Reply via email to