middlewares

package
v0.0.0-...-040e825 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendUserData

func AppendUserData(ctx *fiber.Ctx) error

add to the context of the request data of the user if its logged in so it can be used in the rendered template or as variable for the handler

func AuthGitActions

func AuthGitActions(ctx *fiber.Ctx) error

ask for credentials when making git actions such as read/write operation that depends on the user permissions over repo. works only under the /user/repo.git/info/refs endpoint

func IsLogged

func IsLogged(ctx *fiber.Ctx) error

guard to reject requests under protected routes when the user is not logged in. Checks that the current client has an active session.

func IsOwner

func IsOwner(ctx *fiber.Ctx) error

reject petition if the logged user that is requesting the resource is not the owner of the resource or doesn't have permissions.

func Logger

func Logger(ctx *fiber.Ctx) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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