jwt

package
v0.0.0-...-176ebac Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenExpiredDuration = time.Hour * 24 * 30
	TokenDeviceKey       = "dev"
	TokenSubjectKey      = "https://tinkler.win/jwt/claims"
)

Variables

This section is empty.

Functions

func GetJwtToken

func GetJwtToken(userID, deviceID string, roles []string, accountingSchema string) (tokenString string, err error)

Types

type ErpClaims

type ErpClaims struct {
	Roles            []string `json:"x-erp-allowed-roles"`
	Role             string   `json:"x-erp-default-role"`
	UserID           string   `json:"x-erp-user-id"`
	AccountingSchema string   `json:"x-erp-as"`
}

Jump to

Keyboard shortcuts

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