middleware

package
v0.8.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 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 AuthMiddleware

type AuthMiddleware struct {
	Name        string
	Description string
}

func (AuthMiddleware) Handle

func (AuthMiddleware) Handle(next http.Handler) http.Handler

Handle checks 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.

type BasicAuthMiddleware

type BasicAuthMiddleware struct {
	Name        string
	Description string
}

func (BasicAuthMiddleware) Handle

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

type LoggingMiddleware

type LoggingMiddleware struct {
	Name        string
	Description string
}

func (LoggingMiddleware) Handle

func (LoggingMiddleware) Handle(next http.Handler) http.Handler

Handle log every actions printing used route

type RateLimiterMiddleware

type RateLimiterMiddleware struct {
	Name        string
	Description string
}

func (RateLimiterMiddleware) Handle

Handle set a limit of request allowed in a specific time

type RefreshTokenMiddleware

type RefreshTokenMiddleware struct {
	Name        string
	Description string
}

func (RefreshTokenMiddleware) Handle

Handle 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