Setup¶
This page describes what BIOS and a client must do before the client can place an order, as in the happy path scenario.
Open questions: remove before sharing with clients
- How does the client get the
order_idfor each order?
Sequence¶
---
config:
sequence:
actorMargin: 26
width: 96
height: 44
diagramMarginX: 12
diagramMarginY: 12
---
sequenceDiagram
participant Client
participant ClientAuth as Client Auth<br/>Server
participant Webhook as Client Webhook<br/>Endpoint
participant Auth as BIOS Auth<br/>Server
participant API as BIOS API
participant BIOS
BIOS->>BIOS: 1a. Set up the client's<br/>organization and orders
BIOS-->>Client: 1b. Client ID and secret
Client->>ClientAuth: 2a. Create an OAuth client for BIOS
Client->>Webhook: 2b. Deploy the webhook endpoint
Client->>Auth: 3a. POST /oauth/token
Auth-->>Client: 3b. 200 OK with access token
Client->>API: 4a. POST /webhooks
API-->>Client: 4b. 201 Created with signing secret
Steps¶
- BIOS onboards the client.
- BIOS sets up the client's organization, and an order for each test the client will request.
- BIOS gives the client a client ID and secret for the BIOS API.
- The client prepares to receive webhook events.
- The client creates an OAuth 2.0 client for BIOS in its own auth server, so that BIOS can get access tokens to call the client's webhook endpoint.
- The client deploys an HTTPS webhook endpoint that checks each event's access token and signature.
- Get an access token.
- The client calls the
POST /oauth/tokenendpoint of the BIOS auth server with its client ID and secret. - The BIOS auth server returns a
200response with an access token.
- The client calls the
- Register a webhook.
- The client calls the
POST /webhooksendpoint of the BIOS API with the webhook endpoint's URL and the client credentials from step 2. - The BIOS API returns a
201response with the webhook's signing secret, which the client stores to verify events.
- The client calls the
The access token will expire expires_in seconds after the BIOS auth server issues it. Before then, the client repeats step 3 to get a new token.