https://github.com/nikhilkashyap22/centralised-authentication-system
A centralised Authentication System using JWT for Microservices architecture projects
https://github.com/nikhilkashyap22/centralised-authentication-system
jwt jwt-middleware microservices
Last synced: 22 days ago
JSON representation
A centralised Authentication System using JWT for Microservices architecture projects
- Host: GitHub
- URL: https://github.com/nikhilkashyap22/centralised-authentication-system
- Owner: NikhilKashyap22
- Created: 2025-02-10T06:48:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T07:08:18.000Z (over 1 year ago)
- Last Synced: 2025-02-27T23:45:09.177Z (over 1 year ago)
- Topics: jwt, jwt-middleware, microservices
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authentication Service




## Overview
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.
## Features
- Generates JWT tokens for authentication
- Validates JWT tokens
- Lightweight and easy to integrate with other Spring Boot applications
## Technologies Used
- **Spring Boot** - For building the backend service
- **Hibernate JPA** - For ORM (Object Relational Mapping)
- **MySQL** - As the database
- **JWT** - For secure token-based authentication
## Installation
1. Clone the repository:
```sh
git clone (https://github.com/NikhilKashyap22/Centralised-Authentication-System.git)
```
2. Navigate to the project directory:
```sh
cd authentication-service
```
3. Build the project using Maven:
```sh
mvn clean install
```
4. Run the application:
```sh
mvn spring-boot:run
```
## Usage
### Generate Token
To generate a JWT token, send a `POST` request to:
```http
POST /api/auth/login
```
with the required payload.
### Validate Token
To validate a JWT token, send a `POST` request to:
```http
POST /api/auth/validate
```
with the token in the request body.
## Important Notes
- 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.
## Configuration
Update the `application.properties` file with your MySQL configuration:
```properties
spring.datasource.url=jdbc:mysql://localhost:3306/auth_db
spring.datasource.username=root
spring.datasource.password=yourpassword
```
## License
This project is open-source and available under the MIT License.