Files
minilb/app/operator/auth.go

15 lines
301 B
Go

package operator
import (
"helmet/pkg/passwd"
)
func (oper *Operator) ValidateUser(username, password string) bool {
for i := range oper.auths {
if username == oper.auths[i].Username && passwd.PasswordMatchCompat([]byte(password), oper.auths[i].Password) {
return true
}
}
return false
}