зеркало из https://github.com/mozilla/fxa.git
1.5 KiB
1.5 KiB
Architecture
Recurring Services
FxA Event Broker runs two services (selfUpdatingService
) which refresh a cached copy of data at a given
interval (default is 5 minutes).
sequenceDiagram
participant Auth as FxA Auth Server
participant Ev as FxA Event Broker
participant FS as Google Firestore
Ev-->>Auth: GET /oauth/subscriptions/clients
Auth-->>Ev: Client Capability Response
Note over Ev: Cache Client <br />Capabilities
Ev-->>FS: Fetch Client Webhooks
FS-->>Ev: Webhook Response
Note over Ev: Cache Client <br />Webhook URLs
Login Events
sequenceDiagram
participant Auth as FxA Auth Server
participant SQS as AWS SQS
participant Ev as FxA Event Broker
participant FS as Google Firestore
Auth->>SQS: LoginEvent
SQS->>Ev: LoginEvent
Ev-->>FS: Store Login
Relying Party Events
Note: SQS participant not shown here to save space.
sequenceDiagram
participant Auth as FxA Auth Server
participant Ev as FxA Event Broker
participant PS as Google PubSub
participant RP as Relying Party
participant FS as Google Firestore
Auth->>Ev: RelyingPartyEvent via SQS
Ev-->>+FS: Get RPs the User has logged into (FetchClientIds)
FS-->>-Ev: List of Client Ids
Ev->>PS: RPEvent
loop on clientIds
PS-->>+Ev: POST /proxy/{clientId}
Ev-->>+RP: POST /client/webhook
RP-->>-Ev: {Status: 200}
Ev-->>-PS: {Status: 200}
end