4api: API Server
5auth: Auth Service
6db: Database
7
8client -> api: POST /login {username, password}
8client -> api: 'POST /login {username, password}'
9api -> auth: validateCredentials()
10auth -> db: SELECT user WHERE email = ?
11db -> auth: user row
12auth -> auth: verify password hash
22api -> client: '200 {name: Alice, email: ...}'
23
24client -> api: POST /logout (Bearer token)
25api -> auth: revokeToken()
26auth -> api: {revoked: true}
27api -> client: 200 {ok: true}
26auth -> api: '{revoked: true}'
27api -> client: '200 {ok: true}'