Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LicenseClaims ¶
type LicenseClaims struct { jwt.RegisteredClaims // Add your custom license claims here Product string `json:"product,omitempty"` LicenseID string `json:"license_id,omitempty"` LicenseType string `json:"license_type,omitempty"` LicenseVersion string `json:"license_version,omitempty"` CustomerID string `json:"customer_id,omitempty"` Capabilities map[string]string `json:"capabilities,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` }
LicenseClaims represents the expected claims in your license token
func (*LicenseClaims) IsExpired ¶ added in v1.6.2
func (v *LicenseClaims) IsExpired() bool
func (*LicenseClaims) MaxNumberOfNodes ¶ added in v1.6.2
func (v *LicenseClaims) MaxNumberOfNodes() int
type LicenseValidator ¶
type LicenseValidator struct {
// contains filtered or unexported fields
}
LicenseValidator handles JWT validation with JWKS support
func NewLicenseValidatorFromFile ¶
func NewLicenseValidatorFromFile(jwksPath string) (*LicenseValidator, error)
NewLicenseValidatorFromFile creates a new validator from a JWKS file
func NewLicenseValidatorFromJSON ¶
func NewLicenseValidatorFromJSON(jwksJSON json.RawMessage) (*LicenseValidator, error)
NewLicenseValidatorFromJSON creates a new validator from JWKS JSON
func NewOfflineLicenseValidator ¶ added in v1.6.2
func NewOfflineLicenseValidator() (*LicenseValidator, error)
NewOfflineLicenseValidator creates a new validator using hardcoded JWKS Public Keys
func (*LicenseValidator) Validate ¶ added in v1.6.2
func (v *LicenseValidator) Validate(tokenString string) (*LicenseClaims, error)
func (*LicenseValidator) ValidateStrict ¶ added in v1.6.2
func (v *LicenseValidator) ValidateStrict(tokenString string) (*LicenseClaims, error)
Click to show internal directories.
Click to hide internal directories.