public final class GoogleUserCore extends java.lang.Object
UserEvent for user account modifications with one of the listed UserEvent.EventType :
UserEvent.EventType.USER_AUTHORIZATION_GIVEN for new user account authorizations.UserEvent.EventType.USER_AUTHORIZATION_REVOKED for removed user account authorizations.| Modifier and Type | Method and Description |
|---|---|
static Response |
createAuthorizationRedirection(UserIdentity authorizedUser) |
static GoogleCredential |
getCredential(UserIdentity userId) |
static OAuth2Token |
getToken(UserIdentity authorizedUser)
Return token for the given userId, refreshing the old token if necessary
Note: if the token expires, you should use this method to retrieve a new one, refreshing the token
manually may cause race condition with other services using the tokens (there can be only one active
and valid access token at any time)
|
static Response |
login(javax.servlet.http.HttpSession session,
java.lang.String accessToken) |
static Response |
processOAuth2Callback(java.lang.String authorizationCode,
java.lang.String errorCode,
java.lang.String nonce) |
static Response |
register(java.lang.String accessToken) |
static Response |
removeAuthorization(UserIdentity userIdentity) |
static Response |
revoke(UserIdentity userId) |
public static Response processOAuth2Callback(java.lang.String authorizationCode, java.lang.String errorCode, java.lang.String nonce)
authorizationCode - errorCode - nonce - public static OAuth2Token getToken(UserIdentity authorizedUser)
authorizedUser - public static Response createAuthorizationRedirection(UserIdentity authorizedUser)
authorizedUser - valid user idpublic static Response removeAuthorization(UserIdentity userIdentity)
userIdentity - public static Response revoke(UserIdentity userId)
userId - public static GoogleCredential getCredential(UserIdentity userId)
userId - public static Response login(javax.servlet.http.HttpSession session, java.lang.String accessToken)
session - accessToken - Copyright © 2015 Tampere University of Technology, Pori Department.