/Spring_JWT

Spring Boot JWT Authentication A Spring Boot application with JWT authentication, featuring user registration, login, secure API endpoints, and role-based access control.

Primary LanguageJava

Spring Boot JWT Authentication

This project demonstrates a Spring Boot application with JWT (JSON Web Token) authentication. It includes the following features:

  • User registration and login endpoints
  • Secure API endpoints with JWT authentication
  • Role-based access control
  • Password hashing with BCrypt
  • Token validation and refresh mechanism

Technologies Used

  • Spring Boot
  • Spring Security
  • JWT
  • JPA/Hibernate
  • MySQL/PostgreSQL (or any other database)

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/spring-jwt-authentication.git
  2. Configure the database:

    Update the application.properties file with your database credentials.

  3. Run the application:

    mvn spring-boot:run

Endpoints

  • /api/auth/register - User registration
  • /api/auth/login - User login and JWT token generation
  • /api/secure/** - Secure endpoints requiring JWT authentication

License

This project is licensed under the MIT License.


Feel free to customize this description to better fit your specific project and preferences!