[ 
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)

Reply via email to