refactor: use go's builtin basic auth parser

This commit is contained in:
Stavros
2025-02-10 21:42:15 +02:00
parent c4ee269283
commit cfe2a1967a
3 changed files with 37 additions and 59 deletions

View File

@@ -27,7 +27,7 @@ func (hooks *Hooks) UseUserContext(c *gin.Context) types.UserContext {
basic := hooks.Auth.GetBasicAuth(c)
// Check if basic auth is set
if basic.Username != "" {
if basic != nil {
log.Debug().Msg("Got basic auth")
// Check if user exists and password is correct