-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A comprehensive license key authentication system built with ASP.NET Core 8.0 and MongoDB
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
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βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Client App β β REDZAuth API β β MongoDB β
β β β β β β
β β’ License Check βββββΊβ β’ AuthenticationβββββΊβ β’ Users β
β β’ HWID Binding β β β’ Key Managementβ β β’ Licenses β
β β’ User Login β β β’ Blacklist β β β’ Blacklist β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Discord Webhookβ
β β
β β’ Notifications β
β β’ Monitoring β
βββββββββββββββββββ
- User Registration with license key validation
- Secure Login with HWID (Hardware ID) binding
- Password Hashing using SHA256
- IP Address Tracking for security monitoring
- 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
- 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
- HWID Reset functionality for legitimate device changes
- License Key Management (generate, list, filter)
- User Ban/Unban operations
- Status Page for API health monitoring
| 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 |
- .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
- Setup Guide - Detailed installation instructions
- Quick Start Guide - 5-minute setup guide
- Configuration Guide - All configuration options
- Complete API Reference - All endpoints with examples
- Security Guide - Production security considerations
- DocumentaΓ§Γ£o em PortuguΓͺs - Complete Portuguese documentation
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!
- Generate license keys for different subscription plans
- Validate licenses on application startup
- Track license usage and expiration
- Handle license renewals and upgrades
- Secure user registration and authentication
- Device binding with HWID for security
- IP tracking for suspicious activity detection
- Comprehensive user ban/unban system
- Real-time Discord notifications for security events
- License usage analytics
- User activity tracking
- System health monitoring
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
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)
- 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
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
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.
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
- Setup Guide - Get started quickly
- API Reference - Complete endpoint documentation
- Security Guide - Production security checklist
- Configuration Guide - All configuration options
- Quick Start - 5-minute setup
- Portuguese Documentation - DocumentaΓ§Γ£o em PortuguΓͺs
Made with β€οΈ by onlyredz