jwtx

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeToken

func DecodeToken(secret string, token string, skipValidation bool, claim jwt.Claims) error

func FromCtx

func FromCtx(ctx context.Context) jwt.MapClaims

LoggerFromCtx if not exist will panic

func GenerateToken

func GenerateToken(secret string, claims jwt.Claims) (string, error)

GenerateToken generate tokens used for auth

func InjectCtx

func InjectCtx(ctx context.Context, claim jwt.MapClaims) context.Context

func JwtHandler

func JwtHandler(secret string) func(next http.Handler) http.Handler

Types

type ContextKey

type ContextKey string
const (
	JwtxContext ContextKey = "jwtx-context"
)

type JwtHeader

type JwtHeader string

Jump to

Keyboard shortcuts

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