middleware

package
v0.0.0-...-c1abbfc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover(next http.Handler) http.Handler

Recover will recover() from unexpected panics in the code and ensures that clients get a 500 error response. The stack is logged during panic.

func WithReqLogger

func WithReqLogger(next http.Handler) http.Handler

WithReqLogger is a http middleware which will log incoming http request.

Types

type JWTAuth

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

JWTAuth maintains the rest configuration

func NewJWTAuth

func NewJWTAuth(user, secret string, authEnabled bool) *JWTAuth

NewJWTAuth returns JWTAuth

func (*JWTAuth) Auth

func (a *JWTAuth) Auth(next http.Handler) http.Handler

Auth is a middleware which authenticates HTTP requests

Jump to

Keyboard shortcuts

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