/auth-guard

AuthGuard is a robust user authentication and authorization application

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

Auth Guard

Auth Guard is a comprehensive user authentication and authorization system.

Table of Contents

Introduction

Auth Guard is a comprehensive user authentication and authorization system designed to secure your applications and APIs. It provides features such as user registration, login, permission-based access control (PBAC), JWT token-based authentication, and more.

Features

  • User registration and login
  • Permission-based access control (PBAC)
  • JWT token-based authentication
  • Secure password hashing
  • RESTful API endpoints for user management
  • Swagger UI integration for API documentation

Technologies

  • Java
  • Spring Boot
  • Spring Security
  • JWT (JSON Web Tokens)
  • PostgreSQL (for database)
  • Docker (optional, for containerization)
  • Swagger (for API documentation)

Getting Started

To get started with Auth Guard, follow these steps:

  1. Clone the repository: git clone https://github.com/imhosseinzadeh/auth-guard.git
  2. Navigate to the project directory: cd auth-guard
  3. Install dependencies: ./gradlew build
  4. Configure the application (see Configuration section below)
  5. Run the application: ./gradlew bootRun

Configuration

Before running the application, make sure to configure the following:

  • Database connection details (in application.properties)
  • Token secret and expiration times (in application.properties)
  • Logging configuration (if necessary)

Usage

Once the application is up and running, you can:

  • Register new users via the registration endpoint
  • Log in with registered user credentials to obtain JWT tokens
  • Use the JWT tokens for accessing protected API endpoints
  • Define policies for controlling access to resources based on user attributes and context

API Documentation

The API documentation is available using Swagger UI. After running the application, navigate to http://localhost:8080/auth-guard/api-docs to explore the API endpoints and interact with them.

Contributing

Contributions are welcome! If you'd like to contribute to Auth Guard, please follow these steps:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/your-feature-name
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature-name
  5. Submit a pull request

License

This project is licensed under the [GPLv3] License - see the LICENSE file for details.