Authentication And Authorization Internal Flow#
Authentication And Authorization Filter Flow#
- When the Client makes a request with the credentials, the
authentication filter
will intercept the request and validate. If the user is valid then at the post authentication, the filter will store theUserDetails
in theSecurityContext
. TheUserDetails
will have username, authorities etc. Now theauthorization filter
will intercept and decide whether the user has access to the given path based on this authorities stored in theSecurityContext
. If authorized the request will be forwarded to the applicable controllers. See the image below: