I tried to interface a RESTfull web service and after some research I found the spring-social project that give a nice way to make an API binding to REST resource with different security mechanism like OAuth1a/2 out of the box.
My problem is that the Web service I try to interface doesn't match all aspect of OAuth2 in spring social when calling secure rest endpoint, especially the access token transmission for each call.
Spring Social give 4 OAuth2 version specification:
and 3 token strategies
So my problem is the web service handle the access token differently like this:
http://base_api_path/?token=<accessToken>
Or
X-<Vendor>-Token: <token>
So how can I override the spring social default Oauth2 mechanism?
I hope my question is clear enough!
In the spring-social-linkedin project they do something like you want, you might want to take a look to the OAuth2TokenParameterRequestInterceptor method of this class