Hi,

I am trying to integrate HTTP Basic Authentication and Spring for the Restlet 
2.0 M6.

Spring appcontext.xml configures SpringComponent with ssl settings and 
defaultTarget with routers. This works fine.

main() method:
Component component = ((Component) ctx.getBean("top"));
component.start();

looking at the tutorial 
http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/46-restlet/112-restlet.html

its not clear what guard.setNext(restlet);
should be.
I tried to do this:

            Component component = ((Component) ctx.getBean("top"));
            Router router = (Router) ctx.getBean("default");
            ChallengeAuthenticator guard = new 
ChallengeAuthenticator(component.getContext().createChildContext(), 
ChallengeScheme.HTTP_BASIC, "Tutorial");   
            MapVerifier verifier = new MapVerifier();   
            verifier.getLocalSecrets().put("scott", "tiger".toCharArray()); 
            guard.setVerifier(verifier);  
            guard.setNext(router);
            component.getDefaultHost().attachDefault(guard);
            component.start();


it works as before without any difference. I put the test url to the browser 
and it accepts it without asking for credentials.

please, help me with proper configuration

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

Reply via email to