public class Google2Client extends OAuth20Client<Google2Profile>
This class is the OAuth client to authenticate users in Google using OAuth protocol version 2.0.
The scope is by default : Google2Client.Google2Scope.EMAIL_AND_PROFILE
, but it can also but set to : Google2Client.Google2Scope.PROFILE
or Google2Client.Google2Scope.EMAIL
.
It returns a Google2Profile
.
More information at https://developers.google.com/accounts/docs/OAuth2Login
Modifier and Type | Class and Description |
---|---|
static class |
Google2Client.Google2Scope |
Modifier and Type | Field and Description |
---|---|
protected static String |
EMAIL_SCOPE |
protected static String |
PROFILE_SCOPE |
protected Google2Client.Google2Scope |
scope |
configuration
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, urlResolver
logger
Constructor and Description |
---|
Google2Client() |
Google2Client(String key,
String secret) |
Modifier and Type | Method and Description |
---|---|
protected void |
clientInit(WebContext context)
Initialize the client.
|
Google2Client.Google2Scope |
getScope() |
void |
setScope(Google2Client.Google2Scope scope) |
getConfiguration, getKey, getSecret, setConfiguration, setKey, setSecret, toString
computeFinalCallbackUrl, defaultLogoutActionBuilder, defaultRedirectActionBuilder, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getLogoutAction, getLogoutActionBuilder, getRedirectAction, getRedirectActionBuilder, getUrlResolver, internalInit, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrl, setLogoutActionBuilder, setRedirectActionBuilder, setUrlResolver
addAuthorizationGenerator, addAuthorizationGenerators, defaultAuthenticator, defaultCredentialsExtractor, defaultProfileCreator, getAuthenticator, getAuthorizationGenerators, getCredentialsExtractor, getName, getProfileCreator, getUserProfile, notifySessionRenewal, retrieveCredentials, retrieveUserProfile, setAuthenticator, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractor, setName, setProfileCreator
init, reinit
protected static final String PROFILE_SCOPE
protected static final String EMAIL_SCOPE
protected Google2Client.Google2Scope scope
protected void clientInit(WebContext context)
IndirectClient
clientInit
in class OAuth20Client<Google2Profile>
context
- the web contextpublic Google2Client.Google2Scope getScope()
public void setScope(Google2Client.Google2Scope scope)
Copyright © 2018. All rights reserved.