payload

package
v0.0.0-...-57b459a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingAppID implies that the payload of API key does NOT contain app ID.
	ErrMissingAppID = errors.New("missing app id")
	// ErrMissingKey implies that the payload of API key does NOT contain secret key.
	ErrMissingKey = errors.New("missing key")
)

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	AppID string
	Key   string
}

APIKey represents the payload of an API key.

func NewAPIKey

func NewAPIKey(payload crypto.TokenPayload) (APIKey, error)

NewAPIKey parses APIKey from token payload.

func (*APIKey) NewTokenPayload

func (a *APIKey) NewTokenPayload() crypto.TokenPayload

NewTokenPayload converts API key into token payload.

Jump to

Keyboard shortcuts

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