sequenceDiagram
participant Client
participant Server
participant Database
Client->>Server: Send login credentials
Server->>Database: Validate credentials
Database-->>Server: Return user info (if valid)
alt Credentials valid
Server->>Server: Generate JWT
Server-->>Client: Return JWT
Client->>Server: Send request with JWT (Authorization header)
Server->>Server: Verify JWT signature & claims
alt JWT valid
Server-->>Client: Return protected resource/data
else JWT invalid/expired
Server-->>Client: Return 401 Unauthorized
end
else Credentials invalid
Server-->>Client: Return authentication error
end
Created
May 28, 2025 16:51
-
-
Save jaylandro/30080eeac64fa763b63f880cf8a06b43 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.