auth

package
v0.26.7 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata = map[string]string

type TokenSigner

type TokenSigner struct {
	// contains filtered or unexported fields
}

func NewTokenSigner

func NewTokenSigner(secret string, duration time.Duration) (TokenSigner, error)

func (TokenSigner) Sign

func (s TokenSigner) Sign(metadata Metadata) (string, error)

func (TokenSigner) Verify

func (s TokenSigner) Verify(token string) (Metadata, error)

Jump to

Keyboard shortcuts

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