auth

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode string
const (
	ErrorCodeUnknown          ErrorCode = "unknown"
	ErrorCodeMissingBearer    ErrorCode = "missing_bearer"
	ErrorCodeTokenExpired     ErrorCode = "token_expired"
	ErrorCodeTokenNotYetValid ErrorCode = "token_not_yet_valid"
	ErrorCodeInvalidToken     ErrorCode = "invalid_token"
	ErrorCodeVerifierConfig   ErrorCode = "verifier_config"
)

func ClassifyError

func ClassifyError(err error) ErrorCode

type Identity

type Identity struct {
	Method  string
	Subject string
}

type Verifier

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

func NewVerifier

func NewVerifier(cfg config.Config) (*Verifier, error)

func (*Verifier) Authenticate

func (v *Verifier) Authenticate(r *http.Request) (Identity, error)

func (*Verifier) Authorize

func (v *Verifier) Authorize(r *http.Request) error

Jump to

Keyboard shortcuts

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