jwt

package
v0.0.0-...-4790e63 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 5 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 app.IToken, ctx app.Context) *Config

New returns a new loq request middleware.

func (*Config) Handler

func (c *Config) Handler() echo.MiddlewareFunc

Handler will require a JWT.

Jump to

Keyboard shortcuts

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