The Users and Authentication Microservice is a crucial component of the BookMania online bookshop system. It is built using Java with Spring Boot, leveraging Spring Security with JWT tokens for secure authentication and authorization. Passwords are securely stored using bcrypt encryption.
- Authentication: Implements secure authentication using Spring Security with JWT tokens.
- Authorization: Ensures authorized access to resources based on user roles and permissions.
- Integration Management: Manages seamless integration with the Comments and Reviews Microservice and the Bookshelf Microservice.
- Testing: Thoroughly tested with over 95% mutation coverage and 99% branch coverage, ensuring reliability and robustness.
- Java
- Spring Boot
- Spring Security
- JWT Tokens
- Bcrypt Encryption
The microservice provides endpoints for user registration, login (which also supports two-factor authentication). Upon successful authentication, it generates a JWT token that the client can use for subsequent requests to authorized endpoints.
It seamlessly integrates with the Comments and Reviews Microservice and the Bookshelf Microservice to provide a cohesive user experience across the entire BookMania platform.
Passwords are securely hashed using bcrypt before being stored in the database. This ensures that user passwords are never stored in plain text, enhancing the overall security of the system.
The Users and Authentication Microservice has undergone extensive testing to ensure reliability and correctness. It boasts over 95% mutation coverage and 99% branch coverage, providing confidence in its functionality and performance.
To get started with the Users and Authentication Microservice, follow these steps:
- Clone the repository.
- Configure the application properties for your database and other environment-specific settings.
- Build and run the application using Maven or your preferred method.
- Access the API endpoints to interact with the microservice.