In this tutorial, we’re gonna build a Spring Boot, Spring Security: Login and Registration example (Rest API) that supports JWT with HttpOnly Cookie working with H2 Database. You’ll know:
- Appropriate Flow for User Login and Registration with JWT and HttpOnly Cookie
- Spring Boot Rest Api Architecture with Spring Security
- How to configure Spring Security to work with JWT
- How to define Data Models and association for Authentication and Authorization
- Way to use Spring Data JPA to interact with H2 Database
– Related Posts:
- Using Token in HTTP Authorization Headers
- Spring Boot JPA + H2 example: CRUD Rest APIs
- Spring Boot File upload example
- @RestControllerAdvice example in Spring Boot
- Spring Boot @ControllerAdvice & @ExceptionHandler example
- @DataJpaTest example for Spring Data Repository Unit Test
Other Databases:
– Spring Boot Login and Registration example with JWT and MySQL
– Spring Boot Login and Registration example with JWT and MongoDB
Deployment: