This Authentication Service is a Spring Boot application that provides token generation and validation using JWT (JSON Web Token). It does not include filters or security configuration. These must be implemented by the users of this project.
- Generates JWT tokens for authentication
- Validates JWT tokens
- Lightweight and easy to integrate with other Spring Boot applications
- Spring Boot - For building the backend service
- Hibernate JPA - For ORM (Object Relational Mapping)
- MySQL - As the database
- JWT - For secure token-based authentication
- Clone the repository:
git clone (https://github.com/NikhilKashyap22/Centralised-Authentication-System.git)
- Navigate to the project directory:
cd authentication-service
- Build the project using Maven:
mvn clean install
- Run the application:
mvn spring-boot:run
To generate a JWT token, send a POST
request to:
POST /api/auth/login
with the required payload.
To validate a JWT token, send a POST
request to:
POST /api/auth/validate
with the token in the request body.
- This project only generates and validates JWT tokens.
- Filters and security configuration are not included and must be implemented separately.
- Users must handle authentication, user management, and security filters in their own application.
Update the application.properties
file with your MySQL configuration:
spring.datasource.url=jdbc:mysql://localhost:3306/auth_db
spring.datasource.username=root
spring.datasource.password=yourpassword
This project is open-source and available under the MIT License.