middleware

package
v0.0.0-...-2f27ceb Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiddlewareManager

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

func NewMiddlewareManager

func NewMiddlewareManager(authUsecase auth.Usecase, cfg *config.Config, origins []string, logger logger.Logger) *MiddlewareManager

Middleware manager constructor

func (*MiddlewareManager) AdminMiddleware

func (mw *MiddlewareManager) AdminMiddleware(next echo.HandlerFunc) echo.HandlerFunc

Admin permission role

func (*MiddlewareManager) AuthJWTMiddleware

func (mw *MiddlewareManager) AuthJWTMiddleware(authUsecase auth.Usecase, cfg *config.Config) echo.MiddlewareFunc

Authentication based JWT

func (*MiddlewareManager) AuthenticatedOrAdminMiddleware

func (mw *MiddlewareManager) AuthenticatedOrAdminMiddleware() echo.MiddlewareFunc

Role based auth middleware using ctx user

func (*MiddlewareManager) CSRF

func (mw *MiddlewareManager) CSRF(next echo.HandlerFunc) echo.HandlerFunc

CSRF Middleware

func (*MiddlewareManager) DebugMiddleware

func (mw *MiddlewareManager) DebugMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func (*MiddlewareManager) RequestLoggerMiddleware

func (mw *MiddlewareManager) RequestLoggerMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func (*MiddlewareManager) RoleBasedAuthMiddleware

func (mw *MiddlewareManager) RoleBasedAuthMiddleware(roles []string) echo.MiddlewareFunc

Role based auth middleware using ctx user

Jump to

Keyboard shortcuts

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