paseto

package
v0.3.200 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(id, role, privateKey string) (string, error)

func GenerateKey

func GenerateKey() (privateKey, publicKey string)

Types

type Payload added in v0.2.907

type Payload struct {
	Id   string    `json:"id"`
	Role string    `json:"role"`
	Exp  time.Time `json:"exp"`
	Iat  time.Time `json:"iat"`
	Nbf  time.Time `json:"nbf"`
}

func Decode

func Decode(publicKey string, tokenstring string) (payload Payload, err error)

Jump to

Keyboard shortcuts

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