firebase:: installations:: Installations
#include <installations.h>
Installations provides a unique identifier for each app instance and a mechanism to authenticate and authorize actions (for example, sending an FCM message).
Summary
Provides a unique identifier for a Firebase installation. Provides an auth token for a Firebase installation. Provides a API to perform data deletion for a Firebase installation.
Constructors and Destructors | |
|---|---|
~Installations() |
Public functions | |
|---|---|
Delete() | Future< void >Call to delete this Firebase app installation from the Firebase backend. |
DeleteLastResult() | Future< void >Get the results of the most recent call toDelete. |
GetId() | Future< std::string >Returns a stable identifier that uniquely identifies the app installation. |
GetIdLastResult() | Future< std::string >Get the results of the most recent call toGetId. |
GetToken(bool forceRefresh) | Future< std::string >Returns a token that authorizes an Entity to perform an action on behalf of the application identified by installations. |
GetTokenLastResult() | Future< std::string >Get the results of the most recent call toGetToken. |
app() const | App *Get theApp this object is connected to. |
Public static functions | |
|---|---|
GetInstance(App *app) | |
Public functions
GetId
Future<std::string>GetId()
Returns a stable identifier that uniquely identifies the app installation.
| Details | |
|---|---|
| Returns | Unique identifier for the app installation. |
GetToken
Future<std::string>GetToken(boolforceRefresh)
Returns a token that authorizes an Entity to perform an action on behalf of the application identified by installations.
This is similar to an OAuth2 token except it applies to the application instance instead of a user.
For example, to get a token that can be used to send messages to an application via Firebase Cloud Messaging, set entity to the sender ID, and set scope to "FCM".
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | Returns a valid authentication token for the Firebase installation. |
GetTokenLastResult
Future<std::string>GetTokenLastResult()
Get the results of the most recent call toGetToken.
app
App*app()const
~Installations
~Installations()
Public static functions
GetInstance
Installations*GetInstance(App*app)
Returns theInstallations object for anApp creating theInstallations if required.
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | Installations object if successful, nullptr otherwise. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.