http_middleware

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSession   = errors.New("your don't have a session")
	ErrInvalidCSRF = errors.New("invalid csrf")
	ErrNotAuth     = errors.New("available only to authorized users")
	ErrAuth        = errors.New("available only to unauthorized users")
)

Functions

This section is empty.

Types

type HttpMiddleware

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

func InitMiddleware

func InitMiddleware(authUseCase domain.AuthUseCase) *HttpMiddleware

func (*HttpMiddleware) Auth

func (m *HttpMiddleware) Auth(next echo.HandlerFunc) echo.HandlerFunc

func (*HttpMiddleware) CSRF

func (m *HttpMiddleware) CSRF(next echo.HandlerFunc) echo.HandlerFunc

func (*HttpMiddleware) IsSession

func (m *HttpMiddleware) IsSession(next echo.HandlerFunc) echo.HandlerFunc

func (*HttpMiddleware) NotAuth

func (m *HttpMiddleware) NotAuth(next echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

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