Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authon C++ SDK

Authon
Official C++ SDK for Authon — Software Licensing & Authentication Platform

WebsiteDocsDiscordStatus


Requirements

  • Windows (uses WinHTTP)
  • C++17 or later
  • Link with: winhttp.lib (MSVC) or -lwinhttp (MinGW)

Installation

Single header — just copy authon.h into your project:

#include "authon.h"

Compile

MSVC (Visual Studio):

cl /EHsc /O2 example.cpp winhttp.lib

MinGW:

g++ -O2 -o example.exe example.cpp -lwinhttp

Quick Start

#include "authon.h"

int main() {
    authon::Authon auth("your-app-id", "your-api-key");

    if (!auth.init()) {
        printf("Connection failed\n");
        return 1;
    }

    if (auth.login("username", "password")) {
        printf("Level: %d\n", auth.level);
        printf("Expires: %s\n", auth.expiresAt.c_str());
    } else {
        printf("Error: %s\n", auth.lastError.c_str());
    }

    auth.logout();
    return 0;
}

Authentication

Login

if (auth.login("user", "pass")) {
    // auth.level, auth.subscription, auth.expiresAt, auth.sessionToken
}

License Key

if (auth.license("XXXXX-XXXXX-XXXXX-XXXXX")) {
    printf("Valid! Level: %d\n", auth.level);
}

Register

if (auth.registerUser("newuser", "password", "LICENSE-KEY")) {
    printf("Account created!\n");
}

Features

// Variables
std::string val = auth.getVar("key");
auth.setVar("key", "value");
std::string uvar = auth.getUserVar("key");

// File download (raw bytes)
auto data = auth.downloadFile("file-id");
// data is std::vector<unsigned char>

// Activity log
auth.log("User opened application");

// Session check
bool valid = auth.check();

// Logout
auth.logout();

HWID

Auto-generated from system hardware. Override:

auth.login("user", "pass", "custom-hwid");

Links

License

MIT

About

Authon C++ SDK - Native authentication, licensing, HWID lock & file download (Visual Studio)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages