Hi,
I am trying to get the CookieAuthenticator working for our application.
However it goes into a infinite redirect loop on redirecting to the login form.
I can not work out how to get the CookieAuthenticator filter to not intercept
the login form's url.
My application's code is as follows
@Override
public Restlet createInboundRoot() {
Router router = new Router(getContext());
CookieAuthenticator authenticator = new
CookieAuthenticator(getContext(), "My Realm", /*must be 16 bytes*/"My Server
KeyXXX".getBytes());
authenticator.setLoginFormPath("/cm/rest/login/login.ftl");
authenticator.setNext(router);
MapVerifier mapVerifier = new MapVerifier();
mapVerifier.getLocalSecrets().put("chunkylover53", "pwd".toCharArray());
authenticator.setVerifier(mapVerifier);
router.attach("/rest/login/login.ftl", LoginFormServerResource.class,
Template.MODE_STARTS_WITH);
router.attach("/rest/tools/dashboard", DashboardServerResource.class,
Template.MODE_STARTS_WITH);
return authenticator;
}
Trying to go to access http://localhost:8080/cm/rest/login/login.ftl goes into
a redirect loop.
How can I prevent this?
Thanks
Pieter
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3054147