Skip to main content

Module license

Module license 

Source
Expand description

License validation for Logicaffeine verification.

Uses the Stripe-based license system. License keys are Stripe subscription IDs (sub_* format) validated against the Logicaffeine API.

§Usage

use logicaffeine_verify::LicenseValidator;

let validator = LicenseValidator::new();
match validator.validate("sub_abc123xyz") {
    Ok(plan) => println!("License valid: {} plan", plan),
    Err(e) => eprintln!("License error: {}", e),
}

§License Tiers

PlanVerificationPrice
FreeNo$0
SupporterNo$5/mo
ProYes$25/mo
PremiumYes$50/mo
LifetimeYes$50/seat
EnterpriseYesCustom

§Validation Flow

  1. Format check: Key must start with sub_
  2. Cache check: Return cached result if fresh (< 24 hours)
  3. API validation: Call api.logicaffeine.com/validate
  4. Fallback: Use stale cache if network fails

§Caching

Results are cached for 24 hours at:

  • macOS/Linux: ~/.cache/logos/verification_license.json
  • Windows: %LOCALAPPDATA%\logos\verification_license.json

Structs§

LicenseValidator
License validator that checks keys against the API with caching.

Enums§

LicensePlan
License plan tiers.