firebase_admin.credentials module

Firebase credentials module.

Classes

class firebase_admin.credentials.AccessTokenInfo(access_token, expiry)

Bases: tuple

Data included in an OAuth2 access token.

Contains the access token string and the expiry time. The expirty time is exposed as a datetime value.

access_token

Alias for field number 0

expiry

Alias for field number 1

class firebase_admin.credentials.ApplicationDefault

Bases: firebase_admin.credentials.Base

A Google Application Default credential.

get_credential()

Returns the underlying Google credential.

Returns:A Google Auth credential instance.
Return type:google.auth.credentials.Credentials
project_id
class firebase_admin.credentials.Base

Bases: object

Provides OAuth2 access tokens for accessing Firebase services.

get_access_token()

Fetches a Google OAuth2 access token using this credential instance.

Returns:An access token obtained using the credential.
Return type:AccessTokenInfo
get_credential()

Returns the Google credential instance used for authentication.

class firebase_admin.credentials.Certificate(cert)

Bases: firebase_admin.credentials.Base

A credential initialized from a JSON certificate keyfile.

get_credential()

Returns the underlying Google credential.

Returns:A Google Auth credential instance.
Return type:google.auth.credentials.Credentials
project_id
service_account_email
signer
class firebase_admin.credentials.RefreshToken(refresh_token)

Bases: firebase_admin.credentials.Base

A credential initialized from an existing refresh token.

get_credential()

Returns the underlying Google credential.

Returns:A Google Auth credential instance.
Return type:google.auth.credentials.Credentials
client_id
client_secret
refresh_token

Send feedback about...

Need help? Visit our support page.