context

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MissingTokenInContextError              = errors.New("no token in context")
	MissingTokenClaimsInContextError        = errors.New("no token claims in context")
	UnexpectedTokenTypeInContextError       = errors.New("unexpected token type in context")
	UnexpectedTokenClaimsTypeInContextError = errors.New("unexpected token claims type in context")
)

Functions

func GetCtxRawToken

func GetCtxRawToken(ctx *gin.Context) (string, error)

GetCtxRawToken tries to get the raw token from the context

func GetCtxTokenClaims

func GetCtxTokenClaims(ctx *gin.Context) (*jwt.MapClaims, error)

GetCtxTokenClaims tries to get the token claims from the context

func SetCtxRawToken

func SetCtxRawToken(ctx *gin.Context, rawToken *string)

SetCtxRawToken sets the raw token in the context

func SetCtxTokenClaims

func SetCtxTokenClaims(ctx *gin.Context, claims *jwt.MapClaims)

SetCtxTokenClaims sets the token claims in the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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