coderd

package
v0.8.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2022 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentVersion        = 3
	HeaderKeyID           = "kid"
	AccountTypeSalesforce = "salesforce"
	VersionClaim          = "version"
	PubSubEventLicenses   = "licenses"
)
View Source
const EnvAuditLogEnable = "CODER_AUDIT_LOG_ENABLE"

Variables

View Source
var (
	ErrInvalidVersion        = xerrors.New("license must be version 3")
	ErrMissingKeyID          = xerrors.Errorf("JOSE header must contain %s", HeaderKeyID)
	ErrMissingLicenseExpires = xerrors.New("license missing license_expires")
)
View Source
var ValidMethods = []string{"EdDSA"}

Functions

func NewEnterprise

func NewEnterprise(options *coderd.Options) *coderd.API

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims
	// LicenseExpires is the end of the legit license term, and the start of the grace period, if
	// there is one.  The standard JWT claim "exp" (ExpiresAt in jwt.RegisteredClaims, above) is
	// the end of the grace period (identical to LicenseExpires if there is no grace period).
	// The reason we use the standard claim for the end of the grace period is that we want JWT
	// processing libraries to consider the token "valid" until then.
	LicenseExpires *jwt.NumericDate `json:"license_expires,omitempty"`
	AccountType    string           `json:"account_type,omitempty"`
	AccountID      string           `json:"account_id,omitempty"`
	Version        uint64           `json:"version"`
	Features       Features         `json:"features"`
}

type Enablements added in v0.8.10

type Enablements struct {
	AuditLogs bool
}

type Features

type Features struct {
	UserLimit int64 `json:"user_limit"`
	AuditLog  int64 `json:"audit_log"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL