jwtauth

package
v0.0.0-...-97189e1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JWTKey    = "jwt"
	ClaimsKey = "claims"
	UserIdKey = "user_id"
)

Variables

This section is empty.

Functions

func CreateJWTToken

func CreateJWTToken(req JWTRequest) (jwt.Token, error)

Types

type JWTRequest

type JWTRequest struct {
	Claims    map[string]any `json:"claims"`
	UserId    int32          `json:"user_id"`
	Address   string         `json:"address"`
	IpAddress string         `json:"ip_address"`
	UserAgent string         `json:"user_agent"`
}

Jump to

Keyboard shortcuts

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