Skip to content

Commit

Permalink
Update OAuth workflow diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed Sep 5, 2023
1 parent 9ac909b commit 0be6924
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,32 @@ and complete authentication of the user.

The following image is a workflow diagram that describes the OAuth2
authorization process for Ring-OAuth2. It should give you an overview
of how all the different URIs interact.
of how all the different URIs interact:

```mermaid
sequenceDiagram
Client->>Ring Server: "`GET `:launch-uri``"
Ring Server-->>Client: redirect to :authorize-uri
Client->>Auth Server: GET :authorize-uri
Auth Server-->>Client: redirect to :redirect-uri
Client->>Ring Server: GET :redirect-uri
Ring Server->>Auth Server: POST :access-token-uri
Auth Server->>Ring Server: returns access token
Ring Server-->>Client: redirect to :landing-uri
Client->>Ring Server: GET :landing-uri
```

The following URIs are set by the authorization server and should be absolute:

- `:authorize-uri`
- `:access-token-uri`

The remaining URIs are set by you, and may be any local URI you deem
appropriate:

![OAuth2 Workflow](https://github.com/weavejester/ring-oauth2/raw/master/docs/workflow.png)
- `:launch-uri`
- `:redirect-uri`
- `:landing-uri`

## Contributing

Expand Down
Binary file removed docs/workflow.png
Binary file not shown.

0 comments on commit 0be6924

Please sign in to comment.