Authentication And Authorization Internal Flow#
Authentication And Authorization Filter Flow#
- When the Client makes a request with the credentials, the
authentication filterwill intercept the request and validate. If the user is valid then at the post authentication, the filter will store theUserDetailsin theSecurityContext. TheUserDetailswill have username, authorities etc. Now theauthorization filterwill 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:
