In fact I cannot solve this problem. If in my enroler I do

clientInfo.getRoles().add(ADMINISTRATOR);

then I have two ways to use that information while loading a resource:

        ra = new RoleAuthorizer();
        ra.getAuthorizedRoles().add(MyEnroler.ADMINISTRATOR);
        ra.setNext(adminRouter);
        rootRouter.attach("/admin", ra);

Or I can just check the role "by hand" in my ServerResource.doInit();

The first way of course is the best one, but how can I use that model with
the SpringBeanRouter?

On Wed, Jun 8, 2011 at 2:00 PM, Daniele Dellafiore <[email protected]>wrote:

> Hi. I'm having a lot of difficoulties implementing a authn and authz
> mechanism (authenticators, enroler...) cause my main router is a
> SpringBeanRouter.
> That way I lose all control on paths and things get messy.
>
> There's a way to make the two world talk or is better to give up the
> SpringBeanRouter and spring configuration in restlet at all?
>
> Thanks.
>
> --
> Daniele Dellafiore
> http://danieledellafiore.net
>



-- 
Daniele Dellafiore
http://danieledellafiore.net

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

Reply via email to