[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688312#action_12688312
 ] 

Paul Austin commented on HTTPCLIENT-836:
----------------------------------------

This version of the method handles multiple parameters.

  private Collection<Entry<String, String>> getParameters(String uri)
    throws URISyntaxException {
    List<NameValuePair> parameters = URLEncodedUtils.parse(new URI(uri), null);
    List<Entry<String,String>> parameterEntries = new 
ArrayList<Entry<String,String>>();
    for (NameValuePair parameter : parameters) {
      String name = parameter.getName();
      String value = parameter.getValue();
      parameterEntries.add(new OAuth.Parameter(name, value));
    }
     return parameterEntries;
  }

At the moment I'm using the code from the oauth.net library. It would probably 
be better to remove that dependency and create the authentication parameters 
directly. The OAuth code requires us to create a number of other objects which 
are not really required.

If there is interest in adding this to the httpclient code base I can spend 
some time to make the code self contained.

Paul

> Add OAuth AuthScheme
> --------------------
>
>                 Key: HTTPCLIENT-836
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-836
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpAuth
>    Affects Versions: 4.0 Beta 2
>            Reporter: Paul Austin
>         Attachments: OAuthCredentials.java, OAuthScheme.java, 
> OAuthSchemeFactory.java
>
>
> Would it be possible to add OAuth AuthScheme?
> I have some example code using the http://oauth.googlecode.com/svn/code/java/ 
> oauth library. It might be better to refactor that code into the main code 
> base if anyone has the time.
> I'll see if I can attach my implementation.
> Paul

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to