claims

package
v0.0.0-...-e6b7f3d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserRole  = "User"
	AdminRole = "Admin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	UID  int    `json:"uid"`
	Role string `json:"role"`
	jwt.StandardClaims
}

Claims contains the necessary information for user identification

func New

func New(userID int, role string) *Claims

New claims used as JWT payload

Jump to

Keyboard shortcuts

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