Refactor authentication handlers and middleware

This commit is contained in:
bronku 2025-03-28 20:33:34 +01:00
parent 024d63bb16
commit bba6e8618a
5 changed files with 67 additions and 38 deletions

View file

@ -0,0 +1,11 @@
package auth
import "errors"
func (a *Authenticator) verifyCredentials(login, password string) error {
if login == "admin" && password == "secret" {
return nil
}
return errors.New("wrong credentials")
}