middleware

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 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 NewAuthMiddleware

func NewAuthMiddleware() AuthMiddleware

func (AuthMiddleware) GetDescription

func (m AuthMiddleware) GetDescription() string

GetDescription returns the middleware description

func (AuthMiddleware) GetName

func (m AuthMiddleware) GetName() string

GetName returns the middleware name

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 RateLimiterMiddleware

type RateLimiterMiddleware struct {
	Name        string
	Description string
}

func NewRateLimiterMiddleware

func NewRateLimiterMiddleware() RateLimiterMiddleware

func (RateLimiterMiddleware) GetDescription

func (m RateLimiterMiddleware) GetDescription() string

GetDescription returns the middleware description

func (RateLimiterMiddleware) GetName

func (m RateLimiterMiddleware) GetName() string

GetName returns the middleware name

func (RateLimiterMiddleware) Handle

Handle set a limit of request allowed in a specific time

type RefreshTokenMiddleware

type RefreshTokenMiddleware struct {
	Name        string
	Description string
}

func NewRefreshTokenMiddleware

func NewRefreshTokenMiddleware() RefreshTokenMiddleware

func (RefreshTokenMiddleware) GetDescription

func (m RefreshTokenMiddleware) GetDescription() string

GetDescription returns the middleware description

func (RefreshTokenMiddleware) GetName

func (m RefreshTokenMiddleware) GetName() string

GetName returns the middleware name

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