firebase_admin.credentials module

Firebase credentials module.

Classes

ApplicationDefault

class firebase_admin.credentials.ApplicationDefault

Bases: firebase_admin.credentials.Base

A Google Application Default credential.

get_access_token()

Fetches a Google OAuth2 access token using this application default credential.

Returns:An access token obtained via oauth2client.
Return type:oauth2client.client.AccessTokenInfo
get_credential()

Returns the underlying Google credential.

Returns:An oauth2client credential instance.
Return type:oauth2client.client.GoogleCredentials

Base

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.

get_credential()

Returns the credential instance used for authentication.

Certificate

class firebase_admin.credentials.Certificate(file_path)

Bases: firebase_admin.credentials.Base

A credential initialized from a JSON certificate keyfile.

get_access_token()

Fetches a Google OAuth2 access token using this certificate credential.

Returns:An access token obtained via oauth2client.
Return type:oauth2client.client.AccessTokenInfo
get_credential()

Returns the underlying Google credential.

Returns:An oauth2client credential instance.
Return type:oauth2client.client.GoogleCredentials
project_id
service_account_email
signer

RefreshToken

class firebase_admin.credentials.RefreshToken(file_path)

Bases: firebase_admin.credentials.Base

A credential initialized from an existing refresh token.

client_id
client_secret
get_access_token()

Fetches a Google OAuth2 access token using this refresh token credential.

Returns:An access token obtained via oauth2client.
Return type:oauth2client.client.AccessTokenInfo
get_credential()

Returns the underlying Google credential.

Returns:An oauth2client credential instance.
Return type:oauth2client.client.GoogleCredentials
refresh_token

Send feedback about...

Need help? Visit our support page.