Package io.meeds.oauth.google
Interface GoogleProcessor
- All Superinterfaces:
OAuthProviderProcessor<GoogleAccessTokenContext>
- All Known Implementing Classes:
GoogleProcessorImpl
OAuth processor for calling Google+ operations
- Author:
- Marek Posolda
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.services.oauth2.Oauth2getOAuth2Instance(GoogleAccessTokenContext accessTokenContext) Obtain instance of GoogleOauth2object, which can be used to call various operations in Google API (obtain user informations, obtain informations about your access token etc)com.google.api.services.plus.PlusgetPlusService(GoogleAccessTokenContext accessTokenContext) Obtain instance of Google (@link Plus} object, which can be used to call various operations in Google+ API (Obtain list of your friends, obtain your statuses, comments, activities etc...)com.google.api.services.oauth2.model.UserinfoobtainUserInfo(GoogleAccessTokenContext accessTokenContext) Obtain informations about user from Google+ .voidrefreshToken(GoogleAccessTokenContext accessTokenContext) Refresh Google+ token.Methods inherited from interface io.meeds.oauth.spi.OAuthProviderProcessor
getAccessTokenFromUserProfile, getAuthorizedSocialApiObject, processOAuthInteraction, processOAuthInteraction, removeAccessTokenFromUserProfile, revokeToken, saveAccessTokenAttributesToUserProfile, validateTokenAndUpdateScopes
-
Method Details
-
obtainUserInfo
com.google.api.services.oauth2.model.Userinfo obtainUserInfo(GoogleAccessTokenContext accessTokenContext) Obtain informations about user from Google+ .- Parameters:
accessTokenContext- google access token- Returns:
- userinfo object with filled info about this user
-
getOAuth2Instance
com.google.api.services.oauth2.Oauth2 getOAuth2Instance(GoogleAccessTokenContext accessTokenContext) Obtain instance of GoogleOauth2object, which can be used to call various operations in Google API (obtain user informations, obtain informations about your access token etc)- Parameters:
accessTokenContext-- Returns:
- oauth2 object
-
getPlusService
Obtain instance of Google (@link Plus} object, which can be used to call various operations in Google+ API (Obtain list of your friends, obtain your statuses, comments, activities etc...)- Parameters:
accessTokenContext-- Returns:
- plus object
-
refreshToken
Refresh Google+ token. Note that argument needs to have "refreshToken" available. The "accessToken" will be refreshed and updated directly on this instance of accessTokenContext- Parameters:
accessTokenContext-
-