domain_auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPasswordInvalid = errors.New("password invalid")
View Source
var ErrTokenExpired = errors.New("token expired")
View Source
var ErrTokenInvalid = errors.New("token invalid")

Functions

This section is empty.

Types

type PasetoPayload

type PasetoPayload struct {
	Audience   string    `json:"aud"`
	Issuer     string    `json:"issuer"`
	Subject    string    `json:"sub"`
	IssuedAt   time.Time `json:"iat"`
	Expiration time.Time `json:"exp"`
	NotBefore  time.Time `json:"nbf"`
	Jti        uuid.UUID `json:"jti"`
}

func CreatePasetoPayload

func CreatePasetoPayload(
	email string,
	duration time.Duration) *PasetoPayload

func (*PasetoPayload) CreatePasetoTokenByPayload

func (p *PasetoPayload) CreatePasetoTokenByPayload(key []byte) (string, error)

Jump to

Keyboard shortcuts

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