forked from minmatarfleet/minmatar.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
title Minmatar.org Authentication Sequence | ||
|
||
actor Browser | ||
participant "Front-end\n(Astro)" as FrontEnd | ||
participant "Back-end\n(Django)" as BackEnd | ||
database Database | ||
boundary Discord | ||
|
||
Browser->FrontEnd: Get home page | ||
FrontEnd->Browser: Home page with login icon | ||
Browser->BackEnd: /users/login | ||
BackEnd->Browser: Redirect to Discord | ||
Browser->Discord: oauth2/authorize | ||
Discord->Browser: Redirect to callback API {with code} | ||
Browser->BackEnd: /users/callback {code} | ||
BackEnd->Discord: Get access token {with code} | ||
Discord->BackEnd: Access token | ||
BackEnd->>Database: Save discord+django users | ||
BackEnd->Browser: Redirect to frontend login {with token} | ||
Browser->FrontEnd: /users/login {token} | ||
FrontEnd->Browser: Logged-in page | ||
Browser->Browser: Store token in cookie | ||
Browser->FrontEnd: Get page with data {token} | ||
FrontEnd->BackEnd: Get backend data {token} | ||
BackEnd->BackEnd: Validate token | ||
BackEnd->FrontEnd: JSON content | ||
FrontEnd->Browser: HTML content |