twt

package
v0.0.0-...-3127a7f Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidSignatureError        = errors.New("invalid signature")
	InvalidTwtError              = errors.New("invalid twt")
	MismatchedObjectContentError = errors.New("object changed")
)

Functions

This section is empty.

Types

type TwtProvider

type TwtProvider struct {
	SecretKey string
}

func New

func New(secretKey string) *TwtProvider

func (*TwtProvider) Create

func (t *TwtProvider) Create(ctx context.Context, o lua.Object) (string, error)

Create a twt

func (*TwtProvider) Verify

func (t *TwtProvider) Verify(ctx context.Context, o lua.Object, twt string) error

Verify the twt Input: - spec: the objet to be verified - twt: the twt - error: the error if something is wrong with either twt or the object

Jump to

Keyboard shortcuts

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