AuthorizationResult

public final class AuthorizationResult extends Object
implements Parcelable

Result returned from a request to authorize

Inherited Constant Summary

int CONTENTS_FILE_DESCRIPTOR
int PARCELABLE_WRITE_RETURN_VALUE

Field Summary

public static final Creator<AuthorizationResult> CREATOR

Public Constructor Summary

AuthorizationResult(String serverAuthCode, String accessToken, String idToken, List<String> grantedScopes, GoogleSignInAccount googleSignInAccount, 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 the PendingIntent 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()
Returns true if this result contains a resolution that needs to be launched.
int
GoogleSignInAccount
toGoogleSignInAccount()
Converts this result to an equivalent GoogleSignInAccount object, if the authorization operation was successful in returning tokens.
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
abstract int
describeContents()
abstract void
writeToParcel(Parcel arg0, int arg1)

Fields

public static final Creator<AuthorizationResult> CREATOR

Public Constructors

public AuthorizationResult (String serverAuthCode, String accessToken, String idToken, List<String> grantedScopes, GoogleSignInAccount googleSignInAccount, PendingIntent pendingIntent)

Public Methods

public boolean equals (Object o)

public String getAccessToken ()

Returns the access token.

public List<String> getGrantedScopes ()

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

public PendingIntent getPendingIntent ()

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

public String getServerAuthCode ()

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

public boolean hasResolution ()

Returns true if this result contains a resolution that needs to be launched.

Please see getPendingIntent() for additional context.

public int hashCode ()

public GoogleSignInAccount toGoogleSignInAccount ()

Converts this result to an equivalent GoogleSignInAccount object, if the authorization operation was successful in returning tokens. If, instead, a PendingIntent was provided to launch the authorization flow, this will return null.

Returns

public void writeToParcel (Parcel dest, int flags)