auth

package
v0.0.0-...-03ce9ab Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(requiredLevel int) gin.HandlerFunc

AuthMiddleware deals with checking authentication and authorization (Is the user logged in and permitted to see/do something)

func CheckPassword

func CheckPassword(username string, password string, session sessions.Session) error

CheckPassword checks if the password correctly correlates to the password hash stored in the Database

Types

type AuthenticationError

type AuthenticationError struct {
	Code    int
	Message string
}

func (*AuthenticationError) Error

func (e *AuthenticationError) Error() string

Jump to

Keyboard shortcuts

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