Spring Security
Spring Security
Crash Course
INTRODUCTION
Spring Boot Security Secure our web application by default and further we
can customize as per need.
We just need to add the spring boot start security dependency in our
application.
Request
Client Server
Response
IMPORTANT TERMS
Authentication: The identity of users are checked for providing the access to the system.
User is verified. validating that users are whom they claim to be.
Authorization: Giving the user permission to access a specific resource or function.
Filter: A filter is an object that is invoked at the preprocessing and postprocessing of a
request.
Request
Filter
Client Server
Response
CREATE PROJECT ADD SECURITY
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
HOW SPRING SECURITY WORKS
Authentication Authentication
Manager Provider
authenticate(Authentication auth)
Authentication
Provider
Provider Authentication
Manager true UserDetailService
Provider
Filter
(Authentication)
Authentication
Provider