Class GoogleConnect
The GoogleConnect Login class allows the sign in with google functionality. The GoogleConnect requires to create a corresponding google cloud project. To enable the GoogleConnect to sign-in on the Simulator create a corresponding web login - https://developers.google.com/+/web/signin/
To enable the GoogleConnect to sign-in on Android Follow step 1 from here - https://developers.google.com/+/mobile/android/getting-started
To enable the GoogleConnect to sign-in on iOS follow step 1 from here - https://developers.google.com/+/mobile/ios/getting-started
-
Method Summary
Modifier and TypeMethodDescriptionprotected Oauth2Creates the oauth2 to be used to login in case no native login is available for this service.static GoogleConnectGets the GoogleConnect singleton instance .booleanReturns true if this service supports native login.protected booleanvalidateToken(String token) Returns true if the previous granted access token is still valid otherwise false.Methods inherited from class Login
addScopes, connect, doLogin, doLogin, doLogout, getAccessToken, isPreferRedirectPrompt, isUserLoggedIn, nativeIsLoggedIn, nativelogin, nativeLogout, setAccessToken, setCallback, setClientId, setClientSecret, setOauth2URL, setPreferRedirectPrompt, setRedirectURI, setScope, validateToken
-
Method Details
-
getInstance
Gets the GoogleConnect singleton instance .
Returns
the GoogleConnect instance
-
isNativeLoginSupported
public boolean isNativeLoginSupported()Description copied from class:LoginReturns true if this service supports native login. If implementation returns true here, the nativelogin, nativelogout, nativeIsLoggedIn should be implemented
Returns
true if the service supports native login
- Specified by:
isNativeLoginSupportedin classLogin
-
createOauth2
Description copied from class:LoginCreates the oauth2 to be used to login in case no native login is available for this service.
Returns
- Overrides:
createOauth2in classLogin- Returns:
- the Oauth2 to be used to login if no native login available and on the simulator
-
validateToken
Description copied from class:LoginReturns true if the previous granted access token is still valid otherwise false.
Parameters
token: the access token to check
Returns
true of the token is valid
- Specified by:
validateTokenin classLogin
-