auth

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken           = errors.New("invalid token")
	ErrMissingAuthorization   = errors.New("authorization header missing or malformed")
	ErrMissingCacheScopes     = errors.New("token does not contain cache scopes")
	ErrInvalidCacheScopes     = errors.New("invalid JSON in cache scopes")
	ErrNoCacheScopes          = errors.New("token does not contain any cache scopes")
	ErrMissingRepositoryID    = errors.New("token does not contain repository id")
	ErrVerifierInitialization = errors.New("token verifier initialization failed")
)

Functions

This section is empty.

Types

type CacheScope

type CacheScope struct {
	Scopes []Scope
	RepoID string
}

type Options

type Options struct {
	Issuer         string
	JWKSURL        string
	SkipValidation bool
}

type Scope

type Scope struct {
	Scope      string `json:"Scope"`
	Permission int    `json:"Permission"`
}

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

func NewVerifier

func NewVerifier(options Options) *Verifier

func (*Verifier) CacheScope

func (v *Verifier) CacheScope(ctx context.Context, authorization string) (CacheScope, error)

Jump to

Keyboard shortcuts

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