Giter Site home page Giter Site logo

spring-boot-3-spring-security6-jwt-token's Introduction

Spring Boot 3, Spring Security 6, and JWT Token Authentication

Java Spring Boot Spring Security LinkedIn GPL License

Welcome to the Spring Boot 3, Spring Security 6, and JWT Token Authentication project. This project demonstrates how to integrate Spring Boot, Spring Security, and JWT (JSON Web Token) for secure user authentication and authorization.

Table of Contents

Introduction

The Spring Boot 3, Spring Security 6, and JWT Token Authentication project provides a practical example of user authentication and authorization using Spring Boot and JWT. It showcases how to implement a secure authentication system with role-based access control.

Features

  • User registration and login with JWT-based authentication.
  • Role-based authorization for controlling user access to different parts of the application.
  • Secure password hashing and salting using industry best practices.
  • Integration with PostgreSQL database for storing user information.

Technologies Used

  • Java: Programming language for building the application.
  • Spring Boot: Framework for creating production-ready Spring applications.
  • Spring Security: Framework for securing Spring applications.
  • JWT: Token-based authentication using JSON Web Tokens.
  • PostgreSQL: Database for storing user-related data.

Getting Started

Follow these steps to set up and run the project on your local machine:

  1. Clone the repository: git clone https://github.com/GustavoRuiz0/spring-boot-3-spring-security6-jwt-token.git
  2. Navigate to the project directory: cd spring-boot-3-spring-security6-jwt-token
  3. Update the database configuration in application.properties file.
  4. Build the project: ./mvnw clean install (or equivalent for Windows: mvnw.cmd clean install)
  5. Run the application: ./mvnw spring-boot:run (or equivalent for Windows: mvnw.cmd spring-boot:run)

Configuration

  • Database Configuration: Update the application.properties file with your PostgreSQL database credentials.

Usage

  1. Register a new user using the POST /auth/register endpoint.
  2. Obtain a JWT by logging in using the POST /auth/login endpoint.
  3. Include the JWT in the headers of protected endpoints for authorized access.

Endpoints

  • POST /auth/register: Register a new user.
  • POST /auth/login: Obtain a JWT by logging in.
  • More endpoints for specific resources can be added as per your application's requirements.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and create a pull request.

Contact

Connect with the project author on LinkedIn for any questions or suggestions.


License: This project is licensed under the terms of the GNU General Public License (GPL).

spring-boot-3-spring-security6-jwt-token's People

Contributors

gustavoruiz0 avatar malcolmmello avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.