Spring Boot Auth

Learn how authentication works

Create Account

Minimum 6 characters
Email format valid
Password minimum 6 characters
Passwords match
All fields filled

Already have an account? Login here

Login

Email format valid
Password provided

Don't have an account? Sign up here

Sign Up Flow
📱
Frontend
User Input
📨
DTO
UserRequestDTO
⚙️
Service
UserService
🔒
BCrypt
Hash Password
💾
Database
PostgreSQL
Login Flow
📱
Frontend
Credentials
🔍
AuthService
Find User
Verify
BCrypt.matches()
🎫
JWT
Generate Token
📱
Frontend
Receive JWT

Dashboard

User Profile

Authentication Status

Authenticated
JWT Token will appear here...

Protected API Request

Fetch your user data using JWT authentication

GET /user/{id}
Bearer <JWT Token>

Response

Response will appear here after API integration...

Backend Activity

Real-time visualization of backend processing

Activity will appear here when API calls are made...

API Request Inspector

View detailed request and response information

Last Request

Request Body

{}

Response Body

{}

JWT Token Structure

Understanding JSON Web Tokens

Header
{
  "alg": "HS256",
  "typ": "JWT"
}
·
Payload
{
  "sub": "user-id",
  "iat": 1234567890,
  "exp": 1234567890
}
·
Signature
HMACSHA256(base64UrlEncode(header) + "." +
base64UrlEncode(payload), secret)

JWT data will appear here after you log in via API integration.

Protected Request Flow
📱
Frontend
Send JWT
🔐
Filter
JwtAuthenticationFilter
Validate
JWT Verification
🔒
Security
SecurityContext
⚙️
Controller
Handler
💾
Database
Query