Documentation ¶
Index ¶
- Constants
- Variables
- func GetLicenseInfoFromJWT(license string, publicKeys []string) (*licverifier.LicenseInfo, error)
- func GetSubnetURL() string
- func RefreshLicense(client cluster.HTTPClientI, licenseKey string) (licInfo *licverifier.LicenseInfo, license string, err error)
- func ValidateLicense(client cluster.HTTPClientI, licenseKey, email, password string) (licInfo *licverifier.LicenseInfo, license string, err error)
- type LicenseMetadata
Constants ¶
View Source
const (
// Constants for subnet configuration
ConsoleSubnetURL = "CONSOLE_SUBNET_URL"
)
Variables ¶
View Source
var (
OfflinePublicKeys = []string{
`-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEaK31xujr6/rZ7ZfXZh3SlwovjC+X8wGq
qkltaKyTLRENd4w3IRktYYCRgzpDLPn/nrf7snV/ERO5qcI7fkEES34IVEr+2Uff
JkO2PfyyAYEO/5dBlPh1Undu9WQl6J7B
-----END PUBLIC KEY-----`,
}
)
Functions ¶
func GetLicenseInfoFromJWT ¶
func GetLicenseInfoFromJWT(license string, publicKeys []string) (*licverifier.LicenseInfo, error)
GetLicenseInfoFromJWT will return license metadata from a jwt string license
func RefreshLicense ¶ added in v0.6.4
func RefreshLicense(client cluster.HTTPClientI, licenseKey string) (licInfo *licverifier.LicenseInfo, license string, err error)
func ValidateLicense ¶
func ValidateLicense(client cluster.HTTPClientI, licenseKey, email, password string) (licInfo *licverifier.LicenseInfo, license string, err error)
ValidateLicense will download the current subnet public key, if the public key its not available for license verification then console will fall back to verification with hardcoded public keys
Types ¶
type LicenseMetadata ¶
type LicenseMetadata struct { Email string `json:"email"` Issuer string `json:"issuer"` TeamName string `json:"teamName"` ServiceType string `json:"serviceType"` RequestedAt string `json:"requestedAt"` ExpiresAt string `json:"expiresAt"` AccountID int64 `json:"accountId"` Capacity int64 `json:"capacity"` }
LicenseMetadata claims in subnet license
Click to show internal directories.
Click to hide internal directories.