-
- All Implemented Interfaces:
-
android.os.Parcelable
public class IdpResponse implements Parcelable
A container that encapsulates the result of authenticating with an Identity Provider.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classIdpResponse.Builder
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<IdpResponse>CREATOR
-
Method Summary
Modifier and Type Method Description static IdpResponsefromResultIntent(@Nullable() Intent resultIntent)Extract the IdpResponse from the flow's result intent. static IdpResponsefrom(@NonNull() Exception e)static IntentgetErrorIntent(@NonNull() Exception e)IdpResponsewithResult(AuthResult result)IntenttoIntent()IdpResponse.Buildermutate()booleanisSuccessful()UsergetUser()StringgetProviderType()Get the type of provider. booleanisNewUser()Returns true if this user has just signed up, false otherwise. StringgetEmail()Get the email used to sign in. StringgetPhoneNumber()Get the phone number used to sign in. StringgetIdpToken()Get the token received as a result of logging in with the specified IDP StringgetIdpSecret()Twitter only. FirebaseUiExceptiongetError()Get the error for a failed sign in. AuthCredentialgetCredentialForLinking()booleanhasCredentialForLinking()booleanisRecoverableErrorResponse()intdescribeContents()voidwriteToParcel(Parcel dest, int flags)booleanequals(Object o)inthashCode()StringtoString()-
-
Method Detail
-
fromResultIntent
@Nullable() static IdpResponse fromResultIntent(@Nullable() Intent resultIntent)
Extract the IdpResponse from the flow's result intent.
- Parameters:
resultIntent- The intent which{@code onActivityResult}was called with.
-
from
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) static IdpResponse from(@NonNull() Exception e)
-
getErrorIntent
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) static Intent getErrorIntent(@NonNull() Exception e)
-
withResult
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) IdpResponse withResult(AuthResult result)
-
toIntent
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) Intent toIntent()
-
mutate
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) IdpResponse.Builder mutate()
-
isSuccessful
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) boolean isSuccessful()
-
getUser
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) User getUser()
-
getProviderType
@Nullable() String getProviderType()
Get the type of provider. e.g. PROVIDER_ID
-
isNewUser
boolean isNewUser()
Returns true if this user has just signed up, false otherwise.
-
getPhoneNumber
@Nullable() String getPhoneNumber()
Get the phone number used to sign in.
-
getIdpToken
@Nullable() String getIdpToken()
Get the token received as a result of logging in with the specified IDP
-
getIdpSecret
@Nullable() String getIdpSecret()
Twitter only. Return the token secret received as a result of logging in with Twitter.
-
getError
@Nullable() FirebaseUiException getError()
Get the error for a failed sign in.
-
getCredentialForLinking
@Nullable() AuthCredential getCredentialForLinking()
-
hasCredentialForLinking
@Nullable() boolean hasCredentialForLinking()
-
isRecoverableErrorResponse
boolean isRecoverableErrorResponse()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
hashCode
int hashCode()
-
-
-
-