Crate fxa_client

Source
Expand description

§Firefox Accounts Client

The fxa-client component lets applications integrate with the Firefox Accounts identity service. The shape of a typical integration would look something like:

  • Out-of-band, register your application with the Firefox Accounts service, providing an OAuth redirect_uri controlled by your application and obtaining an OAuth client_id.

  • On application startup, create a FirefoxAccount object to represent the signed-in state of the application.

  • When the user wants to sign in to your application, direct them through a web-based OAuth flow using begin_oauth_flow or begin_pairing_flow; when they return to your registered redirect_uri, pass the resulting authorization state back to complete_oauth_flow to sign them in.

  • Display information about the signed-in user by using the data from get_profile.

  • Access account-related services on behalf of the user by obtaining OAuth access tokens via get_access_token.

  • If the user opts to sign out of the application, calling disconnect and then discarding any persisted account data.

Macros§

debug
error
info
trace
warn

Structs§

AccessTokenInfo
An OAuth access token, with its associated keys and metadata.
AttachedClient
A client connected to the user’s account.
AuthorizationInfo
Information about the authorization state of the application.
AuthorizationParameters
Parameters provided in an incoming OAuth request.
CloseTabsPayload
The payload sent when invoking a “close tabs” command.
Device
A device connected to the user’s account.
DeviceConfig
Device configuration
DevicePushSubscription
Details of a web-push subscription endpoint.
FirefoxAccount
Object representing the signed-in state of an application.
FxaConfig
FxaStateMachineChecker
LocalDevice
Local device that’s connecting to FxA
Profile
Information about the user that controls a Firefox Account.
ScopedKey
A cryptographic key associated with an OAuth scope.
SendTabPayload
The payload sent when invoking a “send tab” command.
TabHistoryEntry
An individual entry in the navigation history of a sent tab.
UserData
User data provided by the web content, meant to be consumed by user agents

Enums§

AccountEvent
An event that happened on the user’s account.
CloseTabsResult
DeviceCapability
A “capability” offered by a device.
DeviceType
Enumeration for the different types of device.
Error
FxA internal error type These are used in the internal code. This error type is never returned to the consumer.
FxaError
Public error type thrown by many [FirefoxAccount] operations.
FxaEvent
Fxa event
FxaRustAuthState
High-level view of the authorization state
FxaServer
FxaState
Fxa state
FxaStateCheckerEvent
Internal state machine events
FxaStateCheckerState
State passed to the state checker, this is exactly the same as internal_machines::State except the Complete variant uses a named field for UniFFI compatibility.
IncomingDeviceCommand
A command invoked by another device.

Type Aliases§

ApiResult
Result returned by public-facing API functions
Result
Result returned by internal functions