jwt

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingJwtToken = errors.Unauthorized(reason, "JWT token is missing")
	ErrWrongContext    = errors.Unauthorized(reason, "Wrong context for middleware")
)

Functions

func Server

Server is a server auth middleware. Check the token and extract the info from token.

func WithSignToken

func WithSignToken(a authn.Authenticator, userID string) middleware.Middleware

WithSignToken is a client jwt middleware used to sign a jwt token.

func WithToken

func WithToken(token string) middleware.Middleware

WithToken is a client jwt middleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

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