Relay Client
Represents a client for the Relay API.
Use this struct to connect and authenticate with a Relay server, managing authorization to call protected endpoints.
Authorization
Clients should use the fxa_client::FirefoxAccount::getAccessToken() function to obtain a relay-scoped access token (scope:
https://identity.mozilla.com/apps/relay
).Then, construct the `RelayClient` with the access token. All requests will then be authenticated to the Relay server via
Authorization: Bearer {fxa-access-token}
.The Relay server verifies this token with the FxA OAuth
/verify
endpoint.Clients are responsible for getting a new access token when needed.
Constructors
This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.
Creates a new RelayClient
instance.
Functions
Creates a Relay user record in the Relay service database.
Creates a new Relay mask (alias) with the specified metadata.
Retrieves all Relay addresses associated with the current account.