oltu-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Sedding (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OLTU-174) OAuthResourceResponse does not support binary response bodies
Date Mon, 01 Jun 2015 08:39:17 GMT

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

Julian Sedding updated OLTU-174:
--------------------------------
    Attachment: OLTU-174.patch

Attached is a patch, which allows accessing the body of an {{OAuthResourceResponse}} as an
{{InputStream}}.

> OAuthResourceResponse does not support binary response bodies
> -------------------------------------------------------------
>
>                 Key: OLTU-174
>                 URL: https://issues.apache.org/jira/browse/OLTU-174
>             Project: Apache Oltu
>          Issue Type: Bug
>          Components: oauth2-client
>    Affects Versions: oauth2-1.0.0
>            Reporter: Julian Sedding
>         Attachments: OLTU-174.patch
>
>
> I am working on a simple webapp that authorizes a user via OAuth to connect to a REST
API on a remote server and then proxies any calls to the API to the remote server.
> Amongst other things, the remote server delivers images, which fails currently. This
is because {{OAuthResourceResponse}} only provides access to the body as {{String}}. Instead
it should provide access to an {{InputStream}}.
> {code:java}
> final OAuthClient oAuthClient = new OAuthClient(new UrlConnectionClient());
> final OAuthResourceResponse response =
>             oAuthClient.resource(bearerClientRequest, "GET", OAuthResourceResponse.class);
> response.getBody() // <-- returns String not InputStream
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message