ApiManagementConsoleV2.License (api_management_console v0.1.2)

Copy Markdown View Source

Offline license validation using signed JWT tokens.

The consumer sets API_CONSOLE_LICENSE_KEY in their environment. The library validates the signature against an embedded public key and extracts claims (tier, expiry, trial info).

License claims

{
  "tier": "paid" | "free",
  "expires_at": "2026-12-31" (ISO8601, optional),
  "trial": true | false,
  "trial_start": "2026-01-01" (ISO8601),
  "trial_days": 30
}

Usage

License.get_tier()     # => :paid | :free
License.expired?()     # => true | false
License.in_trial?()    # => true | false

Summary

Functions

Returns true if the license has expired.

Returns the expiry date if set, nil otherwise.

Returns the current license tier: :paid or :free.

Returns true if currently in a trial period.

Functions

expired?()

Returns true if the license has expired.

expires_at()

Returns the expiry date if set, nil otherwise.

get_tier()

Returns the current license tier: :paid or :free.

in_trial?()

Returns true if currently in a trial period.