middleware

package
v0.0.0-...-958ef34 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureValidToken

func EnsureValidToken() func(next http.Handler) http.Handler

EnsureValidToken is a middleware that will check the validity of our JWT.

Types

type CustomClaims

type CustomClaims struct {
	Scope string `json:"scope"`
}

CustomClaims contains custom data we want from the token.

func (CustomClaims) Validate

func (c CustomClaims) Validate(ctx context.Context) error

Validate does nothing for this example, but we need it to satisfy validator.CustomClaims interface.

Jump to

Keyboard shortcuts

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