In this video, I'll show you how to write Java code to secure REST APIs with HTTP Basic authentication using Spring Security. Note that the users are stored in relational database (MySQL).
In detailed, here's what you will learn:
- Understand HTTP Basic authentication
- Use Spring Security to secure an existing REST API with:
- HTTP Basic authentication
- Users stored in MySQL database with passwords encoded using BCrypt
Test HTTP Basic authentication with: web browser, curl, Postman, and code automated tests with Spring Security Test.
Technologies: Java & Spring framework, Spring Web, Spring Security, Spring Data JPA & Hibernate framework.
Software programs: Java Development Kit (JDK), Spring Tool Suite IDE (STS), MySQL Community Server & MySQL Workbench, curl & Postman.