auth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FormID = "afc434ce-bf57-48f7-9844-e9ab4091f19a"

Used to make sure with no shadow of a doubt that the submitted form is the login form.

Variables

This section is empty.

Functions

func Admin

func Admin(c *fiber.Ctx) error

Admin is middleware that only allows the request to continue if the current user is an admin.

func AutoLogin

func AutoLogin(role int64) fiber.Handler

AutoLogin returns middleware that simulates the user being authorised as the provided state. The first user in the db with the required authorisation will be picked.

func Editor

func Editor(c *fiber.Ctx) error

Editor is middleware that only allows the request to continue if the current user is an editor.

func ExpireUserID

func ExpireUserID(userId int64, exceptSessionId string)

func New

func New() fiber.Handler

New returns middleware that handles authentication.

Types

This section is empty.

Jump to

Keyboard shortcuts

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