tokenstore

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidTokenError

type InvalidTokenError struct {
	Err error
}

func (*InvalidTokenError) Error

func (e *InvalidTokenError) Error() string

func (*InvalidTokenError) Unwrap

func (e *InvalidTokenError) Unwrap() error

type TokenStore

type TokenStore interface {
	// New generates a new token for identifier
	New(identifier string) (token string, err error)
	// Authenticate authenticates the token and returns the associated identifier. If token is invalid, err will be of type InvalidTokenError
	Authenticate(token string) (identifier string, err error)
}

TokenStore is an interface to generate and authenticate tokens associated with device identifiers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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