Sequence diagrams
Basics
Messages send in order; par branches run together. Arrows: ->> solid, -->> reply, -x lost, -) async; +/- after the arrow activates/deactivates. wait 1s adds a pause.
sequenceDiagram
autonumber
actor U as User
participant App
participant IdP as Identity provider
database DB
U->>App: Click "Sign in"
App->>IdP: Redirect /authorize
IdP->>U: Login page
U->>IdP: Credentials
alt valid
IdP-->>App: code
App->>+IdP: POST /token
IdP-->>-App: access_token
App->>DB: upsert user
App-->>U: Signed in
else invalid
IdP-->>U: Try again
endFrames
sequenceDiagram
participant C as Client
participant S as Server
C->>S: SYN
S->>C: SYN-ACK
C->>S: ACK
Note over C,S: connection established
par
C->>S: data
and
S->>C: data
end
C-)S: FIN