RE: oath server/protected resource

2012-09-29 Thread Martin Svensson
Yes, I think it is a good idea if we can make the code available that connects to the providers you mention that would be great cheers, martin -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3011242

RE: Problem with CookieAuthenticator

2012-03-10 Thread Martin Svensson
I am slightly confused. Isnt this what the CookieAuthenticator does, sort of? I think I am missing the point somewhere --martin -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2933770

RE: Problem with CookieAuthenticator

2012-03-07 Thread Martin Svensson
Thanks, I suspect that something like that was the problem. Maybe that helper should be added to the crypto extension so it is automatically added as soon as you use that ext martin -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=444

Problem with CookieAuthenticator

2012-03-06 Thread Martin Svensson
Hi, I get the following warning when I use the CookieAuthenticator "Challenge scheme HTTP_Cookie not supported by the Restlet engine" I am using the 2.2 build with the CookieAuthenticator and a SecretVerifier Is there anything I need to do apart from this CookieAuthenticator ca = new CookieAut

RE: OAuth extension - update from draft-10 to latest

2012-03-02 Thread Martin Svensson
Hi Lazlo and thank you for the interest in the OAuth2 extension. We would definitely like you help. When it comes to your specific question, mainly about upgrading to the latest version of the spec. we have decided to wait until it is finalized. According to Kristoffer (who is part of the spec g

RE: Switch Guards

2012-02-08 Thread Martin Svensson
Hi Sebastian. I have done something similar but for another purpose (to cache tokens). I think you should be able to use the same scheme. You basically define your own Restlet that takes either of two routes depending on the request. See this http://restlet.tigris.org/ds/viewMessage.do?dsForumId

RE: HTTPS mutual authentication fails on Android

2012-01-30 Thread Martin Svensson
At least it used to be the case that you could only use the Apache Client connector for https on Android. So for the 2.0.X version I would try that one first. cheers, m -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=

RE: Possible discrepancy in OAuth extension - scope encoding in token validation request

2012-01-30 Thread Martin Svensson
Yes that should be an easy fix and something that we can work on to make simpler. I expect people need to be able make this change since this is not standardized. Whenever the OAuth2 spec is finalized we will update this extension so that would be a good time to fix this as well. thanks, m --

RE: OpenId Howto updated

2012-01-29 Thread Martin Svensson
The link is http://wiki.restlet.org/docs_2.1/13-restlet/28-restlet/404-restlet.html and nothing else. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2912724

OpenId Howto updated

2012-01-29 Thread Martin Svensson
Hi all, I finally got around to document how to set up your own OpenId Provider. You can check it out here, http://wiki.restlet.org/docs_2.1/13-restlet/28-restlet/404-restlet.html. I realize that looking at the Javadoc is not enough so this example is badly needed for anyone that wants to do mo

RE: Possible discrepancy in OAuth extension - scope encoding in token validation request

2012-01-29 Thread Martin Svensson
Hope this issue eventually got solved. In any case we need to document our flow. I suspect that in the long run defacto standards for the communication between the authorization server and reseource server will emerge. Personally I think it is strange that they did not take a shot a standardizin

RE: Series.getValuesAsArray throws null pointer

2011-07-27 Thread Martin Svensson
Some further digging. I think the problem lies in the subList method: public Series subList(String name, boolean ignoreCase) { Series result = createSeries(null); for (E param : this) { if (equals(param.getName(), name, ignoreCase)) { result.add(param);

RE: Server configuration problem - outbound root not configured

2011-07-27 Thread Martin Svensson
I dont think this is a problem with the OAuthExtension (you can verify this by doing an arbitrary client request in a serverresource). The only thing I can think of is 1. Do you really need to pass a context to your AdRestApplication in the first place? I typically dont do that in my apps (alth

RE: Server configuration problem - outbound root not configured

2011-07-27 Thread Martin Svensson
Difficult to say if one cannot see the rest of the code. A couple of things that might cause the problem 1. I would first try this without creating a child context 2. Depending how you configured your OAuthServer it might need more client protocols (but you should see that as an error). I would

Series.getValuesAsArray throws null pointer

2011-07-25 Thread Martin Svensson
I am getting a null pointer when init an HTTPS cllient. It might have to do with the latest update to the trunk. Exception in thread "main" java.lang.NullPointerException at org.restlet.util.WrapperList.size(WrapperList.java:318) at org.restlet.util.Series.getValuesArray(Series.ja

sdc pom error?

2011-07-24 Thread Martin Svensson
The recent change from com.google.inject to com.google.guice in the dependency section broke the pom. I think it should be com.google.inject or possibly com.google.code.guice as groupId cheers, martin -- http://restlet.tigris.org/ds/viewMessage

RE: OAuth extension in Incubator

2011-07-21 Thread Martin Svensson
here is a nifty class that caches your token. Just do something like this OAuthProxy yourProxy = new Restlet yourResource = new yourProxy.setNext(yourResource) UserCache uc = new UserCache(yourProxy, yourResource) The UserCache will route directly to yourResource if it finds an exist

RE: OAuth extension in Incubator

2011-07-20 Thread Martin Svensson
This is actually expected behavior. If you access the resource again but removing the code you will be able to access it, the problem is that it tries to generate a token from an old code. We are working on removing the code once the authorization is complete but that requires an additional redi

RE: OAuth extension in Incubator

2011-07-20 Thread Martin Svensson
You are right, it is not obvious at all! I have run these three example in a servlet server deployed on port 9090. So if you want to run them stand alone you would have to configure your Restlet Server to run on that port. You can go ahead and change all references from 9090 to whatever port you

null pointer exception with Fine Logging

2011-07-19 Thread Martin Svensson
I have noticed a problem with setting logging to Fine. The Authenticator.java throws a null pointer exception in the authenticated/unauthenticated methods (line 234). I am guessing it is the following statement that is problematic request.getChallengeResponse().getIdentifier(). It will crash if t

RE: OAuth extension in Incubator

2011-07-19 Thread Martin Svensson
Hi John, First of all thanks for trying the extension out! I will try to assist you in any way I can (especially since we are modifying the extension as we speak). First of all, the OAuth2 and OpenId extension were moved from the incubator to trunk when 2.1-M5 was released so I would not use an

RE: Re: setNext in Filter

2011-07-05 Thread Martin Svensson
Thanks, that's what I thought. The extending Restlet is what I am looking for but It had been nice with the Filter approach :) //martin -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2785013

setNext in Filter

2011-07-05 Thread Martin Svensson
If I want to change the next restlet in a filter given some condition of the request, e.e. beforeHandle(Request req, Response res){ if(req hasSomeCondition) setNext(someRestlet) else setNext(someOtherRestlet) } that would not work right because handle in Filter is not synchronized. W

OAuth2 samples posted on the wiki

2011-06-09 Thread Martin Svensson
Hi I am working on the howto for OAuth2 extension (still in the incubator). If anyone is playing around with that and would like to give feedback on this howto I would be very happy. http://wiki.restlet.org/developers/172-restlet/257-restlet/310-restlet/392-restlet.html

Observations with working with HTTPS client connectors

2011-05-06 Thread Martin Svensson
Hi all, Recently our server stopped working and I think I have found out why. This is what I have observed with the new ssl ext package. 1. If I want to use the httpclient for HTTPS clients I now need to do Engine.getInstance().getRegisteredClients() .add(0, new org.restlet.ext.httpc

RE: Re: OAuth & Restlet

2011-04-15 Thread Martin Svensson
By the way, if you want example code I would check the test sources. We are working on a big example that will be posted soon. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2720190

RE: OAuth & Restlet

2011-04-12 Thread Martin Svensson
Hi, Yes it should be OK to use, we are working on finalizing it for the 2.1-SNAPSHOT, but these are only minor fixes. If you are planning on using the OAuthProxy (which is used to gain access to e.g. facebook) I would wait a day or two since we are fixing a minor synchronizing issue. If you wan

RE: Getting started with OAuth in eclipse

2011-02-03 Thread Martin Svensson
well? If not I would use those as boiler plate for your project. Let me know if you still have problems Martin Svensson, Ericsson Research > > Once you have done this you should verify that your local mvn repository > > looks like this > > > > .m2/re

restlet on ijetty

2010-05-21 Thread Martin Svensson
Hi all, I have been working on running restlet ontop of ijetty. I can let you know that it works. If the interest is there I would be happy to share how this was done. Is there anyone in particular I should contact in terms of android restlet development cheers, martin --

Bug in Atom extension Readers

2010-05-13 Thread Martin Svensson
Hi, I am using both the FeedContentReader and EntryContentReader. When inline content is detected the type will never be set, hence setting it to text. Code snippet .. else if (localName.equalsIgnoreCase("content")) { if (this.state == State.FEED_ENTRY_CONTENT) {