middleware

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CORS = middleware.CORS()

CORS is ready-to-go CORS middleware

GZIP is ready-to-go GZIP middleware based on echo middleware

Functions

func AttachProfileMiddleware

func AttachProfileMiddleware(db *sqlx.DB) echo.MiddlewareFunc

AttachProfileID attaches ProfileID of user to context

func CACOnlyMiddleware

func CACOnlyMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func EDIPIMiddleware

func EDIPIMiddleware(next echo.HandlerFunc) echo.HandlerFunc

EDIPIMiddleware attaches EDIPI (CAC) to Context Used for CAC-Only Routes

func IsApplicationAdmin

func IsApplicationAdmin(next echo.HandlerFunc) echo.HandlerFunc

func IsProjectAdminMiddleware

func IsProjectAdminMiddleware(db *sqlx.DB) echo.MiddlewareFunc

func IsProjectMemberMiddleware

func IsProjectMemberMiddleware(db *sqlx.DB) echo.MiddlewareFunc

func JWT

func JWT(isDisabled bool, skipIfKey bool) echo.MiddlewareFunc

JWT is Fully Configured JWT Middleware to Support CWBI-Auth

func JWTMock

func JWTMock(isDisabled bool, skipIfKey bool) echo.MiddlewareFunc

JWTMock is JWT Middleware

func KeyAuth

func KeyAuth(isDisabled bool, appKey string, h HashExtractor) echo.MiddlewareFunc

KeyAuth returns a ready-to-go key auth middleware

Types

type HashExtractor

type HashExtractor func(keyID string) (string, error)

HashExtractor returns a hash (string) to be compared with user supplied key

Jump to

Keyboard shortcuts

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