notary

package
v0.0.0-...-ffaa3c7 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExpired = errors.New("expired")
View Source
var ErrInvalid = errors.New("invalid")
View Source
var Iss = "burner.kiwi"

Functions

This section is empty.

Types

type Notary

type Notary struct {
	SigningKey string
	Clock      func() time.Time
}

func New

func New(signingKey string) *Notary

func (*Notary) Sign

func (c *Notary) Sign(purpose string, payload interface{}, ttl int64) (string, error)

Sign produces a JWT with the given payload and name encoded. Valid until ttl

func (*Notary) Verify

func (c *Notary) Verify(signed string, out interface{}) error

Jump to

Keyboard shortcuts

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