public class

FirebaseCredentials

extends Object
java.lang.Object
   ↳ com.google.firebase.auth.FirebaseCredentials

This class is deprecated.
Use GoogleCredentials.

Class Overview

Standard FirebaseCredential implementations for use with FirebaseOptions.

Summary

Public Methods
static FirebaseCredential applicationDefault(HttpTransport transport, JsonFactory jsonFactory)
Returns a FirebaseCredential based on Google Application Default Credentials which can be used to authenticate the SDK.
static FirebaseCredential applicationDefault()
Returns a FirebaseCredential based on Google Application Default Credentials which can be used to authenticate the SDK.
static FirebaseCredential fromCertificate(InputStream serviceAccount, HttpTransport transport, JsonFactory jsonFactory)
Returns a FirebaseCredential generated from the provided service account certificate which can be used to authenticate the SDK.
static FirebaseCredential fromCertificate(InputStream serviceAccount)
Returns a FirebaseCredential generated from the provided service account certificate which can be used to authenticate the SDK.
static FirebaseCredential fromRefreshToken(InputStream refreshToken, HttpTransport transport, JsonFactory jsonFactory)
Returns a FirebaseCredential generated from the provided refresh token which can be used to authenticate the SDK.
static FirebaseCredential fromRefreshToken(InputStream refreshToken)
Returns a FirebaseCredential generated from the provided refresh token which can be used to authenticate the SDK.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static FirebaseCredential applicationDefault (HttpTransport transport, JsonFactory jsonFactory)

Returns a FirebaseCredential based on Google Application Default Credentials which can be used to authenticate the SDK. Allows specifying the HttpTransport and the JsonFactory to be used when communicating with the remote authentication server.

See Google Application Default Credentials for details on Google Application Deafult Credentials.

See Initialize the SDK for code samples and detailed documentation.

Parameters
transport HttpTransport used to communicate with the remote authentication server.
jsonFactory JsonFactory used to parse JSON responses from the remote authentication server.
Returns
  • A FirebaseCredential based on Google Application Default Credentials which can be used to authenticate the SDK.

public static FirebaseCredential applicationDefault ()

Returns a FirebaseCredential based on Google Application Default Credentials which can be used to authenticate the SDK.

See Google Application Default Credentials for details on Google Application Deafult Credentials.

See Initialize the SDK for code samples and detailed documentation.

Returns
  • A FirebaseCredential based on Google Application Default Credentials which can be used to authenticate the SDK.

public static FirebaseCredential fromCertificate (InputStream serviceAccount, HttpTransport transport, JsonFactory jsonFactory)

Returns a FirebaseCredential generated from the provided service account certificate which can be used to authenticate the SDK. Allows specifying the HttpTransport and the JsonFactory to be used when communicating with the remote authentication server.

See Initialize the SDK for code samples and detailed documentation.

Parameters
serviceAccount An InputStream containing the JSON representation of a service account certificate.
transport HttpTransport used to communicate with the remote authentication server.
jsonFactory JsonFactory used to parse JSON responses from the remote authentication server.
Returns
  • A FirebaseCredential generated from the provided service account certificate which can be used to authenticate the SDK.
Throws
IOException If an error occurs while parsing the service account certificate.

public static FirebaseCredential fromCertificate (InputStream serviceAccount)

Returns a FirebaseCredential generated from the provided service account certificate which can be used to authenticate the SDK.

See Initialize the SDK for code samples and detailed documentation.

Parameters
serviceAccount An InputStream containing the JSON representation of a service account certificate.
Returns
  • A FirebaseCredential generated from the provided service account certificate which can be used to authenticate the SDK.
Throws
IOException If an error occurs while parsing the service account certificate.

public static FirebaseCredential fromRefreshToken (InputStream refreshToken, HttpTransport transport, JsonFactory jsonFactory)

Returns a FirebaseCredential generated from the provided refresh token which can be used to authenticate the SDK. Allows specifying the HttpTransport and the JsonFactory to be used when communicating with the remote authentication server.

See Initialize the SDK for code samples and detailed documentation.

Parameters
refreshToken An InputStream containing the JSON representation of a refresh token.
transport HttpTransport used to communicate with the remote authentication server.
jsonFactory JsonFactory used to parse JSON responses from the remote authentication server.
Returns
  • A FirebaseCredential generated from the provided service account credential which can be used to authenticate the SDK.
Throws
IOException If an error occurs while parsing the refresh token.

public static FirebaseCredential fromRefreshToken (InputStream refreshToken)

Returns a FirebaseCredential generated from the provided refresh token which can be used to authenticate the SDK.

See Initialize the SDK for code samples and detailed documentation.

Parameters
refreshToken An InputStream containing the JSON representation of a refresh token.
Returns
  • A FirebaseCredential generated from the provided service account credential which can be used to authenticate the SDK.
Throws
IOException If an error occurs while parsing the refresh token.