Spring Boot 3 Crash Course Part 6: Authentication and Authorization
6 min readDec 30, 2023
In this part we will be looking at how to authenticate and authorize users using Spring Boot.
Part 7 Now Available: Here
Table of Contents:
- What is Authentication and Why Do We Need It?
- What is Authorization?
- Spring Security Module
- How Spring Security Works
- Logging In Users
- Allowing Only Specific Users
Pre-requisites:
- How to create an API using Spring Boot
- How to access the database using Spring Boot
What is Authentication and Why Do We Need It?
Authentication is basically making sure that the user is who they say they are. In many cases, we want to make sure that the person who is accessing our website is registered with us and not some random person.
For example, say you go to Instagram. Instagram wants to make sure that only you are registered with them and they ask you to login. This is called authenticating or verifying the users identity.