handler

package
v0.0.0-...-9f68936 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(h Handler) httprouter.Handle

func Refresh

func Refresh(h Handler) httprouter.Handle

func Verify

func Verify(h Handler) httprouter.Handle

Types

type Handler

type Handler interface {
	ID() string
	Issuer() *jwt.Issuer
	Refresher() *jwt.Issuer
	Identifier(tokenMeta) string
	Role(tokenMeta) string
	Bucket() storage.JSONBucket
	TokenMeta(context.Context, *http.Request) (*tokenMeta, error)
	Dispatch(context.Context, *tokenMeta) error
}

func NewEmail

func NewEmail(bucket storage.JSONBucket, jwtSigningKey []byte, iss, aud string, td, rd time.Duration) (Handler, error)

func NewSMS

func NewSMS(bucket storage.JSONBucket, jwtSigningKey []byte, iss, aud string, td, rd time.Duration) Handler

Jump to

Keyboard shortcuts

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