Available SDKs
Python SDK
authforge.pyPython 3.9+, zero dependencies.
C# SDK
AuthForgeClient.cs.NET 6+, zero dependencies.
C++ SDK
authforge_sdk.h + .cppC++17, OpenSSL, libcurl.
Download Links
| SDK | Files | Requirements | GitHub | Direct Download |
|---|---|---|---|---|
| Python | authforge.py | Python 3.9+ | Repository | Download |
| C# | AuthForgeClient.cs | .NET 6+ | Repository | Download |
| C++ | authforge_sdk.h + authforge_sdk.cpp | C++17, OpenSSL, libcurl | Repository | Download |
How it works
All three SDKs implement the same flow:- Initialize — Create a client with your App ID, App Secret, and heartbeat mode.
- Login — Call
login(licenseKey). The SDK collects the machine’s HWID, generates a cryptographic nonce, and sends a validate request to the AuthForge API. - Verify — The SDK verifies the HMAC-SHA256 signature on the server response using a key derived from
SHA256(appSecret + nonce). This prevents replay and man-in-the-middle attacks. - Heartbeat — A background thread runs at the configured interval (default 15 minutes) to keep the session alive and detect revocations.
- Failure — If authentication or a heartbeat fails, the SDK calls your
onFailurecallback with a reason ("login_failed"or"heartbeat_failed") and the exception. If no callback is set, the process exits.
Common constructor parameters
Every SDK accepts the same parameters:| Parameter | Type | Default | Description |
|---|---|---|---|
appId | string | required | Your application ID from the dashboard |
appSecret | string | required | Your application secret |
heartbeatMode | string | required | "SERVER" or "LOCAL" |
heartbeatInterval | integer | 900 | Seconds between heartbeat checks |
apiBaseUrl | string | https://auth.authforge.cc | Override the API base URL |
onFailure | callback | null | Called on auth/heartbeat failure with (reason, exception) |
requestTimeout | integer | 15 | HTTP request timeout in seconds |
Next steps
- Choose your SDK: Python, C#, or C++
- Read the SDK Best Practices for error handling, offline mode, and UX guidance