I don't think the nested router works the way you expect. You might be able
to tweak it to work, but consider creating a separate authenticator (and
tracer) instance for each guarded resource. I've written this up several
times, but I can never find my old postings when I need them, so I've
created a new pastebin example from yours to demonstrate the idea:

https://pastebin.com/wHYH1ci8

It compiles, but obviously won't actually run.

--tim


On Wed, May 14, 2014 at 7:33 AM, Sergio <[email protected]> wrote:

> Hi again,
>
> I want to protect some resources under /apps/{appid}:
>
> /apps/{appId}/object
>
> To avoid flooding I have pasted my code here:
>
> http://pastebin.com/gqc2dbFS
>
> I use the tracer filter to print the details of the request. The requested
> URI is:
>
> "Resource URI : http://localhost:8080/apps/1";
>
> Which, as far as I understood, according to my createInBoundRoute() method
> should be routed to AppServerResource class after pass through the
> authenticator and the tracer. However I got a 404 error. If I remove the
> credentials from my client, I got a 401 error, also the tracer print the
> information of the request correctly, then I think the first router is
> working properly.
>
> How can I implement a
>
> router1 -> authenticator ->tracer -> router2
>
> routing scheme?
>
> I want the authenticator to only guard resources under /apps/{appId}.
>
> Thanks in advance,
> Sergio
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3078331
>

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

Reply via email to