jwt

package
v0.0.0-...-f0f63f4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsWhitelisted

func IsWhitelisted(method string, path string, arr []string) (found bool)

IsWhitelisted returns true if the request is in the whitelist. If only an asterisk is found in the whitelist, allow all routes. If an asterisk is found in the page string, then whitelist only the matching paths.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config contains the dependencies for the handler.

func New

func New(whitelist []string, webtoken api.IToken, ctx api.IContext) *Config

New returns a new loq request middleware.

func (*Config) Handler

func (c *Config) Handler(next http.Handler) http.Handler

Handler will require a JWT.

Jump to

Keyboard shortcuts

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