Documentation
¶
Overview ¶
Package authn validates `devbox-request-token`, the JWT the gateway attaches to every Daemon call, against the JWKS delivered in Initialize. Only RS256 and ES256 are accepted; the JWS is verified with the standard library.
Index ¶
Constants ¶
View Source
const Leeway = 2 * time.Minute
Leeway tolerates clock skew between the gateway and the sandbox (a restored box's clock may lag briefly).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct {
Issuer string `json:"iss"`
Subject string `json:"sub"`
Audience any `json:"aud"`
Expiry int64 `json:"exp"`
NotBef int64 `json:"nbf"`
Instance string `json:"instance"`
}
Claims are the validated token claims.
func (*Claims) HasAudience ¶
HasAudience reports whether aud contains s.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier holds the trusted keys.
func NewVerifier ¶
NewVerifier returns an empty verifier (it accepts nothing until keys are set).
func (*Verifier) Configured ¶
Configured reports whether keys are loaded.
Click to show internal directories.
Click to hide internal directories.