Class CredentialUtils


  • public class CredentialUtils
    extends java.lang.Object
    Utility class for working with Credential objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.android.gms.auth.api.credentials.Credential buildCredential​(com.google.firebase.auth.FirebaseUser user, java.lang.String password, java.lang.String accountType)
      Build a credential for the specified FirebaseUser with optional password and IdpResponse.
      static com.google.android.gms.auth.api.credentials.Credential buildCredentialOrThrow​(com.google.firebase.auth.FirebaseUser user, java.lang.String password, java.lang.String accountType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • buildCredential

        @Nullable
        public static com.google.android.gms.auth.api.credentials.Credential buildCredential​(@NonNull
                                                                                             com.google.firebase.auth.FirebaseUser user,
                                                                                             @Nullable
                                                                                             java.lang.String password,
                                                                                             @Nullable
                                                                                             java.lang.String accountType)
        Build a credential for the specified FirebaseUser with optional password and IdpResponse.

        If the credential cannot be built (for example, empty email) then will return null.

      • buildCredentialOrThrow

        @NonNull
        public static com.google.android.gms.auth.api.credentials.Credential buildCredentialOrThrow​(@NonNull
                                                                                                    com.google.firebase.auth.FirebaseUser user,
                                                                                                    @Nullable
                                                                                                    java.lang.String password,
                                                                                                    @Nullable
                                                                                                    java.lang.String accountType)
        See Also:
        buildCredential(FirebaseUser, String, String)