Skip to content
REDZ edited this page Aug 23, 2025 · 8 revisions

🏠 Welcome to REDZAuth API

πŸ” REDZAuth API

A comprehensive license key authentication system built with ASP.NET Core 8.0 and MongoDB

.NET MongoDB License GitHub


🎯 What is REDZAuth API?

REDZAuth API is a powerful and secure authentication system designed for software licensing and user management. It provides a complete solution for:

  • πŸ”‘ License Key Management - Generate, validate, and track license keys
  • πŸ‘€ User Authentication - Secure user registration and login with HWID binding
  • πŸ›‘οΈ Security Features - HWID binding, IP tracking, and blacklist system
  • πŸ“Š Monitoring - Real-time Discord webhook notifications
  • ⚑ Performance - Built with modern .NET 8.0 and MongoDB

πŸš€ Quick Start

Get up and running in 5 minutes:

# 1. Clone the repository
git clone https://github.com/onlyredz/REDZAuthAPI-v1.0.git
cd REDZAuthAPI-v1.0

# 2. Configure settings
cp appsettings.Example.json appsettings.json
# Edit appsettings.json with your configuration

# 3. Run the application
dotnet restore && dotnet run

# 4. Access the API
# Swagger UI: https://localhost:7001/swagger
# Status Page: https://localhost:7001/apistatus

πŸ“‹ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client App    β”‚    β”‚  REDZAuth API   β”‚    β”‚    MongoDB      β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β”‚ β€’ License Check │◄──►│ β€’ Authentication│◄──►│ β€’ Users         β”‚
β”‚ β€’ HWID Binding  β”‚    β”‚ β€’ Key Managementβ”‚    β”‚ β€’ Licenses      β”‚
β”‚ β€’ User Login    β”‚    β”‚ β€’ Blacklist     β”‚    β”‚ β€’ Blacklist     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚  Discord Webhookβ”‚
                       β”‚                 β”‚
                       β”‚ β€’ Notifications β”‚
                       β”‚ β€’ Monitoring    β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Key Features

πŸ” Authentication System

  • User Registration with license key validation
  • Secure Login with HWID (Hardware ID) binding
  • Password Hashing using SHA256
  • IP Address Tracking for security monitoring

πŸ”‘ License Management

  • Automatic Key Generation with customizable formats
  • Multiple Plan Types: Monthly, Quarterly, Annual, Lifetime
  • License Validation and usage tracking
  • Custom License Keys for specific use cases

πŸ›‘οΈ Security Features

  • HWID Binding for device-specific access control
  • Blacklist System for banning users, IPs, and HWIDs
  • Discord Webhook Integration for real-time monitoring
  • HWID Mismatch Detection to prevent unauthorized access

πŸ‘¨β€πŸ’Ό Admin Functions

  • HWID Reset functionality for legitimate device changes
  • License Key Management (generate, list, filter)
  • User Ban/Unban operations
  • Status Page for API health monitoring

πŸ“Š API Endpoints Overview

Category Endpoint Method Description
Authentication /api/auth/register POST Register new user
/api/auth/login POST User login
License Management /api/license/generate POST Generate license key
/api/license/custom POST Create custom license
/api/key/list GET List license keys
Admin Functions /api/admin/reset-hwid POST Reset user HWID
/api/ban POST Ban user/IP/HWID
/api/unban POST Unban user/IP/HWID
Status /apistatus GET API health status

πŸ› οΈ Technology Stack

  • .NET 8.0 - Latest LTS version with modern features
  • ASP.NET Core Web API - High-performance web framework
  • MongoDB - Flexible NoSQL database
  • MongoDB.Driver - Official .NET driver
  • Swagger/OpenAPI - Interactive API documentation
  • Dependency Injection - Built-in .NET DI container

πŸ“š Documentation

πŸ“– Getting Started

πŸ”Œ API Reference

🌍 International

⚠️ Security Notice

IMPORTANT: This codebase has been prepared for open-source release, but please be aware of the following security considerations:

  • No Authentication/Authorization: The admin endpoints currently have no authentication
  • No Rate Limiting: No rate limiting is implemented
  • No CORS: CORS policies are not configured
  • HTTPS: Ensure HTTPS is properly configured in production
  • Input Validation: While basic validation exists, consider implementing more robust validation
  • Logging: Current logging uses Console.WriteLine

Always review and test security measures before deploying to production!

🎯 Use Cases

Software Licensing

  • Generate license keys for different subscription plans
  • Validate licenses on application startup
  • Track license usage and expiration
  • Handle license renewals and upgrades

User Management

  • Secure user registration and authentication
  • Device binding with HWID for security
  • IP tracking for suspicious activity detection
  • Comprehensive user ban/unban system

Monitoring & Analytics

  • Real-time Discord notifications for security events
  • License usage analytics
  • User activity tracking
  • System health monitoring

πŸ”„ Workflow Examples

User Registration Flow

1. Generate License Key (Admin)
   └── POST /api/license/generate?plan=mensal
       └── Returns: MENSAL-ABCD-1234

2. User Registration
   └── POST /api/auth/register
       └── Validates license key
       └── Creates user account
       └── Binds HWID to account

3. User Login
   └── POST /api/auth/login
       └── Validates credentials
       └── Checks HWID binding
       └── Returns user info

License Management Flow

1. Create License Keys
   └── POST /api/license/generate?plan=anual
   └── POST /api/license/custom?customKey=PREMIUM-2024&plan=lifetime

2. Monitor Usage
   └── GET /api/key/list?plan=mensal&used=true
   └── Check expiration dates
   └── Track usage patterns

3. Handle Violations
   └── POST /api/ban (ban user/IP/HWID)
   └── POST /api/unban (remove from blacklist)

πŸš€ Performance & Scalability

  • High Performance: Built with ASP.NET Core 8.0 for optimal performance
  • Scalable: MongoDB provides horizontal scaling capabilities
  • Reliable: Comprehensive error handling and logging
  • Flexible: Easy to customize and extend for specific needs

🀝 Contributing

We welcome contributions! Please see our contributing guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Credits

Original Developer: onlyredz

Security Audit & Open Source Preparation: This codebase has been prepared for open-source release with security improvements and comprehensive documentation.

Please maintain the original credits when using or modifying this code.

πŸ“ž Support

For support and questions:

  • πŸ“– Documentation: Check the guides above
  • πŸ› Issues: Create an issue in the GitHub repository
  • πŸ”§ API Testing: Use the Swagger UI at /swagger
  • πŸ“Š Status: Check the status page at /apistatus

πŸ”— Quick Links


Made with ❀️ by onlyredz

GitHub stars GitHub forks GitHub issues