Skip to content

Sequence Diagram

kimsungwon edited this page Nov 10, 2023 · 12 revisions

Sign-in

sequenceDiagram
	participant Browser
	participant mrc-ui
	participant mrc-api
	participant /oauth2/v2/auth
	participant /token
	
	mrc-ui ->> mrc-api: Request for sign-in
	activate mrc-ui
	activate mrc-api
	
	mrc-api ->> mrc-api: Create an anti-forgery state token
	
	mrc-api ->> /oauth2/v2/auth: Request for authentication
	activate /oauth2/v2/auth
	
	/oauth2/v2/auth -->> mrc-api: Return redirect URL for authentication
	deactivate /oauth2/v2/auth
	
	mrc-api -->> Browser: Redirect to authentication page
	activate Browser
	deactivate mrc-api
	
	Browser ->> /oauth2/v2/auth: Request for authentication
	deactivate Browser
	activate /oauth2/v2/auth
	
	/oauth2/v2/auth ->> mrc-api: Redirects to sign-in URL with authorization code
	activate mrc-api
	deactivate /oauth2/v2/auth
	
	mrc-api ->> mrc-api: Confirm state token
	
	mrc-api ->> /token: Request Access token and ID token
	activate /token
	
	/token -->> mrc-api: Return Access token and ID token
	deactivate /token
	
	mrc-api ->> mrc-api: Build MRC Token
	mrc-api -->> mrc-ui: Set MRC Token as cookie
	deactivate mrc-api
	deactivate mrc-ui
Loading

Sign-out

sequenceDiagram
	participant mrc-ui
	participant mrc-api
	
	mrc-ui ->> mrc-api: Request sign-out
	activate mrc-api
	
	mrc-api ->> mrc-ui: Clear cookie
	deactivate mrc-api
Loading
Clone this wiki locally