FirebaseCredentials

public class FirebaseCredentials extends Object

Standard FirebaseCredential implementations for use with FirebaseOptions.

Public Method Summary

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)
Returns a FirebaseCredential generated from the provided service account certificate 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.

Inherited Method Summary

Public Methods

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)

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)

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.

Send feedback about...

Need help? Visit our support page.