Skip to main content

Python SDK for Olivia Auth - Software Licensing Platform

Project description

Olivia Auth Python SDK

Python SDK for Olivia Auth protected apps.

Requirements

  • Windows x64
  • Python 3.8+
  • The app-specific OliviaAuth.dll downloaded from the dashboard

Install

pip install oliviauth

Put OliviaAuth.dll beside your Python entrypoint. The DLL already contains the app owner, app name, server URL, encryption keys, and SSL pin. Your code only passes version and mode.

Quick Start

from oliviauth import OliviaAuth

api = OliviaAuth(version="1.0.0", mode="socket")

session = api.license(input("License key: ").strip())
if not session:
    print(api.last_error)
    raise SystemExit(1)

print(f"Welcome {session.username}")

api.close()

mode can be "socket" or "http". Socket mode is recommended for desktop apps.

What The Customer Ships

your_app.exe or your_app.py
OliviaAuth.dll

Do not put owner_id, client_key, server_key, server URL, SSL pin, or HWID code in the customer app. The DLL handles that internally.

License Auth

from oliviauth import OliviaAuth

api = OliviaAuth(version="1.0.0", mode="socket")

session = api.license("XXXX-XXXX-XXXX-XXXX")
if not session:
    print(api.last_error)
    raise SystemExit(1)

if not session.has_subscription():
    print("No active subscription")
    raise SystemExit(1)

print(session.username)
api.close()

Login

from oliviauth import OliviaAuth

api = OliviaAuth(version="1.0.0", mode="http")

session = api.login("username", "password")
if not session:
    print(api.last_error)
    raise SystemExit(1)

print(session.username)
api.close()

HWID is generated inside OliviaAuth.dll when you do not pass one.

App Variables

api = OliviaAuth(version="1.0.0")
session = api.license("XXXX-XXXX-XXXX-XXXX")

download_url = session.get_app_var("download_url")

api.close()

Errors

Use api.last_error after a failed authentication. DLL load/configuration errors raise RuntimeError with the underlying OliviaAuth message.

Error Fix
OliviaAuth.dll could not be loaded Put the app-specific DLL beside the app or on PATH
OliviaAuth.dll is not configured for this app Download the DLL from the dashboard for this app
SSL pin / certificate error Download a fresh DLL after the dashboard updates the pin
HWID mismatch Reset the user's HWID in the dashboard
Version mismatch Update the app version in code or dashboard

Examples

The examples/ folder uses the protected DLL flow:

File Purpose
quick_start.py Minimal license auth
license_example.py License auth with subscription check
login_example.py Username/password auth
subscription_example.py Subscription check
download_example.py Private download after auth
websocket_example.py Socket mode app
complete_example.py Common calls in one file

OliviaShield

OliviaShield protects your compiled app and returns a bundle containing the protected executable plus OliviaAuth.dll.

For local testing, download OliviaAuth.dll from the app settings page and run your app beside that DLL before sending the executable through Shield.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oliviauth-1.0.2.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oliviauth-1.0.2-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file oliviauth-1.0.2.tar.gz.

File metadata

  • Download URL: oliviauth-1.0.2.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for oliviauth-1.0.2.tar.gz
Algorithm Hash digest
SHA256 45ea602be2274b913d4a917ca4aa64420dc0899ee4adb894808f45718fcd6ca0
MD5 0dc19287bfd3a77365ebc2a2ab75b4b1
BLAKE2b-256 9bb122bbadb08a8d9ce936b94e99400fd94020251949ccebac9962ccaf8bfef6

See more details on using hashes here.

File details

Details for the file oliviauth-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: oliviauth-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for oliviauth-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6816ed8d0ea12f210d6419e22bc6073e559540494b0f4fdd1f2223f51da86e4
MD5 9485998d7fc2726edea78922770d6761
BLAKE2b-256 f601ec0188d2b15da69c6f365c6ad2c9da4f33f4ff81f94afb14aaed3956b433

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page