Skip to content

NikhilKashyap22/Centralised-Authentication-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authentication Service

Spring Boot Hibernate MySQL JWT

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:
    git clone (https://github.com/NikhilKashyap22/Centralised-Authentication-System.git)
  2. Navigate to the project directory:
    cd authentication-service
  3. Build the project using Maven:
    mvn clean install
  4. Run the application:
    mvn spring-boot:run

Usage

Generate Token

To generate a JWT token, send a POST request to:

POST /api/auth/login

with the required payload.

Validate Token

To validate a JWT token, send a POST request to:

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:

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.

About

A centralised Authentication System using JWT for Microservices architecture projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages