jwt

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthChecker

func HealthChecker(cfg Config, client *http.Client) ports.HealthChecker

HealthChecker returns a JWKS health checker.

func WithSubject

func WithSubject(ctx context.Context, subj Subject) context.Context

WithSubject stores the authenticated subject in context.

Types

type Config

type Config = jwtmw.Config

Config aliases the JWT middleware configuration.

func LoadConfig

func LoadConfig(loader *config.Loader) Config

LoadConfig reads JWT configuration from environment.

type Middleware

type Middleware = jwtmw.Middleware

Middleware aliases the JWT middleware.

func NewMiddleware

func NewMiddleware(ctx context.Context, cfg Config, log ports.Logger) (*Middleware, error)

NewMiddleware creates a JWT middleware.

type Subject

type Subject = jwtmw.Subject

Subject aliases the JWT subject payload.

func SubjectFromContext

func SubjectFromContext(ctx context.Context) (Subject, bool)

SubjectFromContext retrieves the subject from context.

Jump to

Keyboard shortcuts

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