User Entity Updates
Understand how to enhance the User entity by adding password and role management for database users. Explore updating database schemas, encoding passwords, and integrating these changes with Spring Security and Thymeleaf to securely manage users and roles within your application.
We'll cover the following...
We'll cover the following...
So far, our security users have been different from our application users. Let’s connect our application users to Spring Security to combine them.
Password and roles
We’ll start by updating the User entity as we need to store two extra things for each User now:
-
The password for the user.
-
The roles that are assigned to the user.
We will represent the roles using an enum: ...