oltu-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Sanso (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OLTU-151) URLClientConnection HTTP POST not encoded in entity body
Date Mon, 14 Sep 2015 10:08:45 GMT

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

Antonio Sanso resolved OLTU-151.
--------------------------------
    Resolution: Fixed

> URLClientConnection HTTP POST not encoded in entity body
> --------------------------------------------------------
>
>                 Key: OLTU-151
>                 URL: https://issues.apache.org/jira/browse/OLTU-151
>             Project: Apache Oltu
>          Issue Type: Bug
>          Components: oauth2-client
>    Affects Versions: oauth2-1.0.0
>         Environment: Windows 7 x64, JDK1.8
>            Reporter: Allan Cheong Tyng Huei
>
> Code:
> final String code = "this-is-an-authorization-code";
> OAuthClientRequest request = OAuthClientRequest.tokenProvider(OAuthProviderType.GOOGLE).setClientId(clientId).setClientSecret(secret).setRedirectURI("http://www.example.com/redirect").setCode(code).setGrantType(GrantType.AUTHORIZATION_CODE).buildQueryMessage();
> URLConnectionClient urlConnectionClient = new URLConnectionClient();
> OAuthResourceResponse response = urlConnectionClient.execute(request, null, HttpMethod.POST,
OAuthResourceResponse.class);
> Response:
> {
>    "error": "invalid_request",
>    "error_description": "Required parameter is missing: grant_type"
> }



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

Mime
View raw message