Re: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-16 Thread Richard Berger
Thanks - that works perfectly for me. I had been returning the guard to fix an earlier problem - but obviously I fixed it in the wrong way. Thanks again for the detailed solution! RB -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Is-it-possible-to-easily-have

Re: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-16 Thread Thierry Boileau
though > right > now I am in the midst of trying to get oAuth2 to work, so it may be a while > before I have a real response. > RB > > -- > View this message in context: > http://restlet-discuss.1400322.n2.nabble.com/Is-it-possible-to-easily-h

RE: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-16 Thread Richard Berger
Thanks again for the update - I will continue to work on this, although right now I am in the midst of trying to get oAuth2 to work, so it may be a while before I have a real response. RB -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Is-it-possible-to-easily-have

RE: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-16 Thread Ioannis Mavroukakis
Yeah the problem IMHO is that you're returning the guard, and the guard knows nothing about your URL scheme if I'm not mistaken. This needs something like router -> guard -> resource instead of guard -> router -> resource. alternatively, there should be an easy way to pattern match a guard to

RE: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-15 Thread Richard Berger
Thank you for the response... My simplified test code is now: public final Restlet createInboundRoot() { Router router = new Router(getContext()); router.attach("/v1/", RootServerResource.class); router.attach("/v2/", RootServerResource.class); GaeAuthenticator guard = new GaeAuthenticator(ge

RE: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-15 Thread Ioannis Mavroukakis
I haven't tested this so please accept my apologies if it doesn't work. You could use the following form of attach() public Route attach(String pathTemplate, Class targetClass, int matchingMode) and attach your guard with a Template.MODE_STARTS_WITH matchi

Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-14 Thread Richard Berger
s message in context: http://restlet-discuss.1400322.n2.nabble.com/Is-it-possible-to-easily-have-authenticated-non-authenticated-versions-tp7557195.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.o