oltu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiburtius, Ashwanth [IWD]" <Ashwanth.Tiburt...@iwd.iowa.gov>
Subject RE: Google OpenID Connect Authentication example
Date Tue, 17 Mar 2015 15:53:55 GMT
Hi Saqib,

See if this helps:

Build request to redirect to Google.

OAuthClientRequest request = OAuthClientRequest.authorizationProvider(OAuthProviderType.GOOGLE)

Redirect to request.getLocationUri()

Get the auth code returned from Google after user signs in.
Get access token using the following.
OAuthClientRequest oAuthClientRequest = OAuthClientRequest.tokenProvider(OAuthProviderType.GOOGLE)

final OAuthAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(oAuthClientRequest);
accessToken = accessTokenResponse.getAccessToken();

Get User info using the following.
final OAuthClientRequest bearerClientRequest = new OAuthBearerClientRequest(Constants.G_USERINFO_URL)

OAuthResourceResponse resourceResponse = oAuthClient.resource(bearerClientRequest,
OAuth.HttpMethod.GET, OAuthResourceResponse.class);

Iowa Workforce Development – IT | 1000 E Grand Ave, Des Moines, IA  50319
(515) 281-3378 | Ashwanth.Tiburtius@iwd.iowa.gov<mailto:Ashwanth.Tiburtius@iwd.iowa.gov>

From: Saqib Ali [mailto:saqib.n.ali@seagate.com]
Sent: Monday, March 16, 2015 8:20 PM
To: user@oltu.apache.org
Subject: Google OpenID Connect Authentication example


Can anyone please send me a Google OpenID Connect Authentication example using the Oltu Open
Connect library?

Thanks! :)
View raw message