auth

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	protocol.BackendClaims
	// IssuedAtQuote is a server-side concern for attestation freshness.
	IssuedAtQuote string `json:"issued_at_quote"`
	jwt.RegisteredClaims
}

Claims represents the JWT payload expected from attested backends.

func (*Claims) Copy

func (c *Claims) Copy() *Claims

Copy returns a deep copy of claims to avoid sharing state across goroutines.

type Validator

type Validator interface {
	Validate(ctx context.Context, token string) (*Claims, error)
}

Validator validates backend attestation tokens and returns parsed claims.

func NewValidator

func NewValidator(cfg *config.Config, httpClient *http.Client) (Validator, error)

NewValidator returns a Validator that uses a remote verifier when configured and falls back to local HMAC validation with backendsJWTSecret.

Jump to

Keyboard shortcuts

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