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 to Delete.
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 to GetId.
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 to GetToken.
app() const
App *
Get the App this object is connected to.

Public static functions

GetInstance(App *app)
Returns the Installations object for an App creating the Installations if required.

Public functions

Delete

Future< void > Delete()

Call to delete this Firebase app installation from the Firebase backend.

DeleteLastResult

Future< void > DeleteLastResult()

Get the results of the most recent call to Delete.

GetId

Future< std::string > GetId()

Returns a stable identifier that uniquely identifies the app installation.

Details
Returns
Unique identifier for the app installation.

GetIdLastResult

Future< std::string > GetIdLastResult()

Get the results of the most recent call to GetId.

GetToken

Future< std::string > GetToken(
  bool forceRefresh
)

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
forceRefresh
If set true, will always return a new token.
Returns
Returns a valid authentication token for the Firebase installation.

GetTokenLastResult

Future< std::string > GetTokenLastResult()

Get the results of the most recent call to GetToken.

app

App * app() const 

Get the App this object is connected to.

Details
Returns
App this object is connected to.

~Installations

 ~Installations()

Public static functions

GetInstance

Installations * GetInstance(
  App *app
)

Returns the Installations object for an App creating the Installations if required.

Details
Parameters
app
The App to create an Installations object from.
Returns
Installations object if successful, nullptr otherwise.