[
https://issues.apache.org/jira/browse/OLTU-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254134#comment-16254134
]
Rafael commented on OLTU-217:
-----------------------------
Hi [~asanso], I agree with you, but the current version (1.0.3-SNAPSHOT)
doesn't show the correct message from authorization server. I received the same
message integrating the google(v4) and facebook(v2.11) oauth servers.
Then, I created a patched version (1.0.3-r1-SNAPSHOT) that show body content
returned into exception using the cause attribute. Thus, the library user can
resolve the problem.
How do I send the patched version to approval and integration with official
version ?
Diff:
https://github.com/rafaeluchoa/oltu/commit/3c6ad323592cd794bae8c449c7918f27caf1e77e
Thanks.
> Missing parameters error while trying to get the access token.
> --------------------------------------------------------------
>
> Key: OLTU-217
> URL: https://issues.apache.org/jira/browse/OLTU-217
> Project: Apache Oltu
> Issue Type: Question
> Components: oauth2-client
> Affects Versions: oauth2-1.0.2
> Reporter: sivan
> Priority: Blocker
>
> Hi,
> I am using 1.0.2 version of OLTU oAuth client and now the implementation is
> blocked due to the below issue.
> The grand type is password. I think for this grant type redirect URI is not
> required.
> Below is the code for getting the access token in the first attempt.
> I have tried with both buildBodyMessage() and buildQueryMessage().
> But the error message shows the access token as missing parameter.
> Is anything else I need to set in the client request as parameter.
> Can you please help me in resolving this issue.
> *+{color:red}Error Message{color}+*
> invalid_request, Missing parameters: access_token
> Stack Trace:
> OAuthProblemException{error='invalid_request', description='Missing
> parameters: access_token', uri='null', state='null', scope='null',
> redirectUri='null', responseStatus=0, parameters={}}
> *+Java Code+*
> OAuthClientRequest request =
> OAuthClientRequest.tokenLocation("https://qa.trustamerica.com/liberty/oauth/token")
>
> .setGrantType(GrantType.PASSWORD)
>
> .setClientId("04B13831B0704781BB6FBE6CBD21B014")
>
> .setClientSecret("90CBA686949C4A7582948D0F852D08F2")
>
> .setUsername("apienvestnet")
>
> .setPassword("Integrate17$")
> .buildBodyMessage();
> OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient());
> GitHubTokenResponse oAuthResponse = oAuthClient.accessToken(request,
> GitHubTokenResponse.class);
> Thanks
> Sivan
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)