auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeys

func GenerateKeys() ([]string, []string)

GenerateKeys will generate uuid v4 keys based of the config yaml file

func GenerateNewKey

func GenerateNewKey() string

GenerateNewKey will create a api key

func IsAuthenticated

func IsAuthenticated() gin.HandlerFunc

IsAuthenticated middleware to make sure all routes are protected

func IsHTAuthenticated

func IsHTAuthenticated() gin.HandlerFunc

IsHTAuthenticated will use basic authentication to compare with a htpasswd set in the config

func ValidateHTPasswd

func ValidateHTPasswd(username, password, htpassword string) bool

ValidateHTPasswd wil compare a username and password to a bcrypt htpasswd

Types

This section is empty.

Jump to

Keyboard shortcuts

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