middleware

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package middleware provides HTTP middleware for the outtake API.

Index

Constants

View Source
const SessionKeyToken = "plex_token"

SessionKeyToken is the session key used to store the Plex authentication token.

Variables

This section is empty.

Functions

func AuthGuard

func AuthGuard(env string) fiber.Handler

AuthGuard provides authentication middleware that checks if the user has a valid Plex token in their session before allowing access to protected routes.

func BindCSRFToken

func BindCSRFToken() fiber.Handler

BindCSRFToken copies the Fiber CSRF token onto the request context for templates.

Returns:

  • Middleware that stores the token and continues the chain.

func RequestLogger

func RequestLogger() fiber.Handler

RequestLogger provides request logging middleware.

func RestoreToken

func RestoreToken(db *database.DB) fiber.Handler

RestoreToken loads a persisted Plex token into the session when missing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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