jwthelper

package
v0.0.0-...-77674a3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWT

func CreateJWT(jwtSecret, username, roles string, expires int64) (string, error)

Types

type CustomClaims

type CustomClaims struct {
	jwt.StandardClaims
	Username string `json:"username,omitempty"`
	Roles    string `json:"roles,omitempty"`
}

func GetClaimsFromContext

func GetClaimsFromContext(jwtSecret string, ctx context.Context) *CustomClaims

Jump to

Keyboard shortcuts

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