common

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsFromToken

func ClaimsFromToken(claim jwt.Claims, token string, key []byte) error

ClaimsFromToken parses the claims from the token

func GetToken

func GetToken(c *gin.Context) (string, error)

GetToken gets the token from the headers

func ParamS added in v0.0.5

func ParamS(param string, c *gin.Context) string

ParamS sanitize the param

func QueryS added in v0.0.5

func QueryS(param string, c *gin.Context) string

QueryS sanitize the param

func Sanitize added in v0.0.5

func Sanitize(param string) string

Sanitize removes all path separators

func SignClaims

func SignClaims(claims jwt.Claims, key []byte) (string, error)

SignClaims signs the claims i.e. creates a token

Types

This section is empty.

Jump to

Keyboard shortcuts

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