Concept Flow - Securing endpoints by role
User sends request
Spring Security intercepts
Check user authentication
Yes
Check user roles
Role matches
Allow access
Response sent
The request passes through Spring Security which checks if the user is authenticated and has the required role before allowing access to the endpoint.