anish-adm / oauth-signpost

Automatically exported from code.google.com/p/oauth-signpost
0 stars 0 forks source link

Request: Modify retrieveRequestToken to take a variable argument for additional parameters. #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, AbstractOAuthProvider provides a retrieveRequestToken method 
which passes the endpointUrl to retrieveToken if the provider is using 
OAuth 1.0a. It seems that google requires a 'scope' parameter built into 
the endpoint url in the exact same manner as what would be crafted by the 
additionalParameters argument of

    protected void retrieveToken(OAuthConsumer consumer, String 
endpointUrl,
            String... additionalParameters)

I propose that retrieveRequestToken be modified to accept a varargs 
additionalParameters object to be passed to retrieveToken. This should be 
backward compatibile with current code while extending the functionality 
of the DefaultOAuthProvider implementation.

I can not make an argument AGAINST this functionality, as providers in the 
future may do other dorking with the endpointUrls like google does now, 
and this change would in no way break spec-correct oauth authorization.

If I have missed something here, please tell me. Currently, my solution is 
to subclass DefaultOAuthProvider, but I feel like this functionality 
should be default.

Thanks,
-Stefan

Original issue reported on code.google.com by arcanef...@gmail.com on 24 Mar 2010 at 3:58

GoogleCodeExporter commented 8 years ago
Sounds like a good idea; I'll flag it as an enhancement request, since it's not 
a
defect. You can simply add the scope parameter to your initial request token 
endpoint
URL.

Original comment by m.kaepp...@gmail.com on 24 Mar 2010 at 4:16