Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Features

Nico Kempe edited this page Feb 14, 2023 · 1 revision

Authentication

The project provides an authentication mechanism that uses JWT for securing the API endpoints. The JwtTokenProvider class generates JWT tokens for successful authentications and the JwtAuthenticationFilter class validates tokens sent in requests. The UserDetailsServiceImpl class implements the Spring UserDetailsService interface to load user-specific data during authentication. Authorization

The project includes authorization mechanisms to control access to specific resources. The Role enum defines the available user roles and the UserRoleService class implements the UserDetailsService interface to retrieve user roles from the database. The JwtAuthenticationFilter validates user roles and authorizes requests based on the user's role. Two-factor authentication

The project implements a two-factor authentication mechanism using TOTP. The TwoFactor class provides methods to generate a secret key, get a TOTP code, create a Google Authenticator bar code, and create a QR code for the bar code. User management

The project provides APIs to manage user accounts. The UserController class implements APIs for user registration, user activation, and password reset. The UserService class provides methods to create and update user accounts, verify user accounts, and reset user passwords. Error handling

The project includes error handling mechanisms to handle exceptions and provide meaningful error messages to API clients. The RestExceptionHandler class handles exceptions thrown during request processing and maps them to HTTP error responses.

Clone this wiki locally