Skip to content

iibabyy/eAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

107 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eAPI - Rust Web API with JWT Authentication

A secure web API built with Rust and Actix-web framework, featuring JWT authentication, PostgreSQL database integration, and robust error handling.

Table of Contents

Quick Start

  1. Clone the repository:

    git clone https://github.com/iibabyy/eAPI.git --depth 1
    cd eAPI
  2. Build and run the application:

    make

    Note: If you want to run it in background, you can use:

    make detach

API Documentation

The API is self-documented using Swagger UI. Once the application is running, you can access the interactive documentation by navigating to:

http://localhost:8080/docs

From there, you can view all available endpoints, see their request/response models, and test them directly from your browser.

Features

Authentication System

  • JWT-based Authentication: Secure authentication using JSON Web Tokens
  • Token Refresh: Endpoint for refreshing authentication tokens
  • Token Revocation: Support for invalidating tokens (logout)
  • Last Active Token Tracking: Prevents token reuse after logout

User Management

  • User Registration: Create new user accounts
  • User Login: Authenticate existing users
  • Password Security: BCrypt hashing for secure password storage

Database Integration

  • PostgreSQL Integration: Robust database support using SQLx
  • Transaction Support: Database transactions for data integrity
  • Connection Pooling: Efficient database connection management with deadpool

About

eCommerce API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages