model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extra

type Extra map[string]interface{}

type KeyPair

type KeyPair struct {
	PrivateKey []byte
	PublicKey  []byte
}

type Payload

type Payload struct {
	ID       uuid.UUID `json:"id"`
	Username string    `json:"username"`
	Roles    []string  `json:"roles"`
	Extra    Extra     `json:"extra"`
	jwt.StandardClaims
}

func NewPayload added in v1.1.0

func NewPayload(username string, roles []string, duration time.Duration, extra Extra) (*Payload, error)

NewPayload creates a new token payload with a specific username and duration

Jump to

Keyboard shortcuts

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