[
https://issues.apache.org/jira/browse/OLTU-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13831472#comment-13831472
]
Prasad commented on OLTU-129:
-----------------------------
i am making a token request as
OAuthClientRequest request = OAuthClientRequest
.tokenLocation("*********************/oauth/token")
.setGrantType(GrantType.AUTHORIZATION_CODE)
.setClientId("codeclient")
.setClientSecret("secret")
.setRedirectURI("https://localhost:8443")
.setCode(code)
.buildQueryMessage();
String authorisation = clientId + ":" + clientSecret;
byte[] encodedAuthorisation =
Base64.encode(authorisation.getBytes());
request.addHeader("Authorization", "Basic " +
encodedAuthorisation.toString());
OAuthClient oAuthClient = new OAuthClient(new
URLConnectionClient());
GitHubTokenResponse oAuthResponse;
oAuthResponse = oAuthClient.accessToken(request,
GitHubTokenResponse.class);
Pleasae guide me if i am doing anything wrong here.
> Unable to add headers to OAuthclientRequest
> -------------------------------------------
>
> Key: OLTU-129
> URL: https://issues.apache.org/jira/browse/OLTU-129
> Project: Apache Oltu
> Issue Type: Bug
> Components: oauth2-client
> Affects Versions: 0.31
> Environment: Java web application,windows 7,Eclipse
> Reporter: Prasad
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Hi,
> I am unable to Pass Http headers to the token endpoint request.
> I would like to use basic authentication.coul you please guide me how can i
> pass headers to the request?
--
This message was sent by Atlassian JIRA
(v6.1#6144)