Skip to content

Commit

Permalink
Merge pull request #20 from trade-tariff/FPO-134-flow-for-client-cred…
Browse files Browse the repository at this point in the history
…entials

FPO-134: Adds sequence diagram for client credentials
  • Loading branch information
willfish authored Apr 2, 2024
2 parents 4843c49 + eb5e3e1 commit 0388204
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# trade-tariff-fpo-developer-hub

Express app giving FPO operators the ability to manage their own API credentials.

## Authentication

When this backend app is deployed to ECS we enable client credentials authentication using Cognito User Pools

```mermaid
sequenceDiagram
participant Client Application
participant Cognito Authorization Server
participant Protected Resource / API
Client Application->>Cognito Authorization Server: Request Access Token (Client ID, Client Secret)
Cognito Authorization Server->>Cognito Authorization Server: Validate Credentials
Cognito Authorization Server->>Client Application: Access Token
Client Application->>Protected Resource / API: API Request (Access Token)
Protected Resource / API->>Protected Resource / API: Validate Token
Protected Resource / API->>Client Application: API Response
```

Access tokens need to be refreshed by the client and the backend decodes/verifies the JWT in the Authorisation header.

0 comments on commit 0388204

Please sign in to comment.