middleware

package
v0.3.2-beta Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Handler http.Handler
}

Middleware struct is extended by every middleware.

func (Middleware) Auth

func (Middleware) Auth(next http.Handler) http.Handler

Check if the JWT used by the request is valid. This middleware must be used only with JWT authentication and will not work with the basic auth.

func (Middleware) BasicAuth

func (Middleware) BasicAuth(next http.Handler) http.Handler

Used to check if the basic auth session is present. Use this middleware to protect resources with the basic authentication.

func (Middleware) Logging

func (Middleware) Logging(next http.Handler) http.Handler

Log every actions printing used route

func (Middleware) RateLimiter

func (Middleware) RateLimiter(next http.Handler) http.Handler

Set a limit of request allowed in a specific time

func (Middleware) RefreshToken

func (Middleware) RefreshToken(next http.Handler) http.Handler

RefreshToken return a new token in request response

Jump to

Keyboard shortcuts

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