util

package
v0.0.0-...-2f92620 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenJWT

func GenJWT(u string, g []string, p *rsa.PrivateKey, t int64) (string, error)

GenJWT generates the jwt token. Among other stuff, it packs in the authenticated user name and the roles that the user belongs to and an expiration time. The info is then signed by the private key of the login server.

Types

type CustomClaims

type CustomClaims struct {
	User  string   `json:"user"`
	Roles []string `json:"roles"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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