I want to implement spring security on a jersey Restful web service, both on server and client side.
The goal is to guarantee user authorization and authentication when he wants to access a protected ressource. I tried a solution by implementing the ConsumerDetailsService and UserDetailsService interfaces on server side and used a CoreOAuthConsumerSupport on client side(calling readProtectedResource).
This works, but the problem is that is doesnot take advantages of the jersey client, for example for passing an array as parameter.
Is there a Jersey client implementation of OAuth?
Yes, Jersey has support for OAuth on both the server and the client side. See the following javadoc pages:
OAuth Server
OAuth Client
OAuth core classes
There is also a twitter client sample application under Jersey samples that uses OAuth: http://java.net/projects/jersey/sources/svn/show/trunk/jersey/samples/oauth-client-twitter?rev=5569