[jira] Created: (HTTPCLIENT-836) Add OAuth AuthScheme

View: New views
9 Messages — Rating Filter:   Alert me  

[jira] Created: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Updated: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Austin updated HTTPCLIENT-836:
-----------------------------------

    Attachment: OAuthSchemeFactory.java
                OAuthScheme.java
                OAuthCredentials.java

The OAuthCredentials extends the UsernamePasswordCredentials to support the access token/secret for delegated oauth access.

> 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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Commented: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

John Kristian commented on HTTPCLIENT-836:
------------------------------------------

OAuthScheme.getParameters doesn't handle several parameters with the same name.  It should.  I suggest returning a List (not a Set) containing instances of OAuth.Parameter.

> 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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Commented: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Commented: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Oleg Kalnichevski commented on HTTPCLIENT-836:
----------------------------------------------

Paul,

I am reluctant to include an authentication scheme to the official distribution of HttpClient, which none of the existing committers would be able to adequately support and maintain. However, I'll happily add your code to the contrib package distributed as reference material with the source distribution:

http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/contrib/src/main/java/org/apache/http/contrib/

Would that be okay with you?

Oleg

> 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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Commented: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

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

Oleg,

I can understand not wanting to take on additional code for maintenance.

I am going to work with the net.oauth team to add the scheme to their library as a plug-in for http client.

Once we have a stable implementation if you could include a FAQ entry referencing the net.oauth so that if people wish to use oauth with http client they can find out how to do it.

If you ever decide to add oauth support to the core I would be happy at that point in donating the code.

Thanks.
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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Commented: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Oleg Kalnichevski commented on HTTPCLIENT-836:
----------------------------------------------

> I am going to work with the net.oauth team to add the scheme to their library as a plug-in for http client.
>
> Once we have a stable implementation if you could include a FAQ entry referencing the net.oauth so that
> if people wish to use oauth with http client they can find out how to do it.

I think that would be the best approach. I will happily add a reference to the net.oauth plugin to the HttpClient documentation and the web site.

Cheers

Oleg

> 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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Updated: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-836:
-----------------------------------------

    Fix Version/s: 4.1.0

> 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
>             Fix For: 4.1.0
>
>         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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Resolved: (HTTPCLIENT-836) Add OAuth AuthScheme

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-836.
------------------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 4.1.0)

Resolving as WONTFIX for now.

Oleg

> 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: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...