oltu-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Kumar <ankit....@gmail.com>
Subject Re: Basic HTTP Authentication
Date Thu, 23 Oct 2014 03:03:55 GMT
Hi Charles,
I just ran the OAuthCientRequest API and sent a custom header with this
request:

OAuthClientRequest request = OAuthClientRequest
.tokenLocation(
"http://192.168.171.128:8099/api/oauth/token")
.setGrantType(GrantType.PASSWORD)
.setClientId("SampleConfidentialApp")
.setClientSecret("6808d4b6-ef09-4b0d-8f28-3b05da9c48ec")
.setUsername("regadmin").setPassword("changeme")
.setScope("resource.READ").buildBodyMessage();

request.setHeader("Authorization", "Some Value");
OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient());
OAuthJSONAccessTokenResponse response = oAuthClient.accessToken(request);

On my server side, I received the following headers:

[image: Inline image 1]

you can find the code for this API at:

https://github.com/apache/oltu/blob/amber-0.10/oauth-2.0/oauth2-client/src/main/java/org/apache/amber/oauth2/client/request/OAuthClientRequest.java

Hope this helps.

-Thanks,
Ankit Kumar




On Wed, Oct 22, 2014 at 1:30 PM, Charles Moulliard <ch007m@gmail.com> wrote:

> Hi,
>
> According to this ticket Oltu OAuth2 Client supports HTTP Basic
> Authentication (https://issues.apache.org/jira/browse/OLTU-13) but I can't
> find soemthing with the github project code
> Can someone tells me where I can find it within the code / test case / demo
> ?
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message