AuthorizationResult

public final classAuthorizationResultextendsObject
implementsParcelable

Result returned from a request to authorize

Inherited Constant Summary

Field Summary

public static finalCreator<AuthorizationResult> CREATOR

Public Constructor Summary

AuthorizationResult(String serverAuthCode,StringaccessToken, String idToken,List<String> grantedScopes, GoogleSignInAccountgoogleSignInAccount,PendingIntent pendingIntent)

Public Method Summary

boolean
String
getAccessToken()
Returns the access token.
List<String>
getGrantedScopes()
Returns the list of scopes that user had granted access to.
PendingIntent
getPendingIntent()
Returns thePendingIntent that can be used to launch the authorization flow.
String
getServerAuthCode()
Returns the server authorization code that can be exchanged by the server for a refresh token.
boolean
hasResolution()
Returnstrueif this result contains a resolution that needs to be launched.
int
GoogleSignInAccount
toGoogleSignInAccount()
Converts this result to an equivalent GoogleSignInAccountobject, if the authorization operation was successful in returning tokens.
void
writeToParcel(Parceldest, int flags)

Inherited Method Summary

Fields

public static finalCreator<AuthorizationResult> CREATOR

Public Constructors

publicAuthorizationResult(StringserverAuthCode, StringaccessToken, StringidToken, List<String> grantedScopes, GoogleSignInAccount googleSignInAccount,PendingIntent pendingIntent)

Public Methods

public booleanequals(Objecto)

publicStringgetAccessToken()

Returns the access token.

publicList<String> getGrantedScopes()

Returns the list of scopes that user had granted access to.

publicPendingIntent getPendingIntent()

Returns thePendingIntent that can be used to launch the authorization flow.

publicStringgetServerAuthCode()

Returns the server authorization code that can be exchanged by the server for a refresh token.

public booleanhasResolution()

Returnstrueif this result contains a resolution that needs to be launched.

Please see getPendingIntent()for additional context.

public inthashCode()

publicGoogleSignInAccount toGoogleSignInAccount()

Converts this result to an equivalentGoogleSignInAccount object, if the authorization operation was successful in returning tokens. If, instead, aPendingIntent was provided to launch the authorization flow, this will returnnull.

Returns

public voidwriteToParcel(Parceldest, int flags)