Class LicenseInfo

Assembly: redb.Core.Pro.dll

License information parsed from JWT token.
Contains issuer, features, version limits, and expiration data.

public record LicenseInfo : IEquatable<LicenseInfo>

Inheritance

ObjectLicenseInfo

Implements

Properties

Country

Optional country code (e.g., "RU", "US")

public string? Country { get; init; }

Email

Contact email for the licensee

public string Email { get; init; }

ExpiresAt

When the license expires (null = perpetual)

public DateTimeOffset? ExpiresAt { get; init; }

Features

Licensed features: "core.pro", "postgres.pro", "mssql.pro"

public string[] Features { get; init; }

IsCommercial

True if this is a commercial license (default).

public bool IsCommercial { get; }

IsEducational

True if this is an educational (non-commercial) license.

public bool IsEducational { get; }

IsExpired

Checks if the license has expired.

public bool IsExpired { get; }

IssuedAt

When the license was issued

public DateTimeOffset IssuedAt { get; init; }

Issuer

License issuer identifier (e.g., "redbase.app", "redb.ru")

public string Issuer { get; init; }

KeyId

RSA key identifier for key rotation (e.g., "app-2024-01")

public string KeyId { get; init; }

Licensee

Company or person name the license was issued to

public string Licensee { get; init; }

LicenseId

Unique license identifier (jti claim) for revocation support

public string LicenseId { get; init; }

LicenseType

License type: "commercial" (default) or "educational"

public string LicenseType { get; init; }

MaxVersion

Maximum library version this license supports

public Version MaxVersion { get; init; }

Methods

HasFeature(string)

Checks if the license includes a specific feature.

public bool HasFeature(string feature)

IsVersionValid(Version)

Checks if the license version covers the given library version.

public bool IsVersionValid(Version assemblyVersion)

Constructors