Documentation
¶
Index ¶
- func AdminAuth(apiKey string) func(http.Handler) http.Handler
- func AuthMiddleware(authService *auth.Service, cookieName string) func(http.Handler) http.Handler
- func CSRFMiddleware(csrfConfig models.CSRFConfig) func(http.Handler) http.Handler
- func CorsMiddleware(allowedOrigins []string) func(http.Handler) http.Handler
- func EndpointHooksMiddleware(config *models.Config, authService *auth.Service) func(http.Handler) http.Handler
- func OptionalAuthMiddleware(authService *auth.Service, cookieName string) func(http.Handler) http.Handler
- func RateLimitMiddleware(rateLimitService models.RateLimitService) func(http.Handler) http.Handler
- func Redirect(ctx *models.EndpointHookContext, url string, status int)
- func RedirectAuthMiddleware(authService *auth.Service, cookieName string, redirectURL string, status int) func(http.Handler) http.Handler
- type AuthContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAuth ¶ added in v1.4.0
AdminAuth is middleware that checks for a valid admin API key in the request headers.
func AuthMiddleware ¶
func CSRFMiddleware ¶ added in v1.0.4
func EndpointHooksMiddleware ¶ added in v1.0.3
func OptionalAuthMiddleware ¶
func RateLimitMiddleware ¶ added in v1.0.4
Types ¶
type AuthContextKey ¶ added in v1.4.0
type AuthContextKey string
const ContextUserID AuthContextKey = "user_id"
Click to show internal directories.
Click to hide internal directories.