login-validator: refactor auth methods
This commit is contained in:
parent
1d2199aaef
commit
8d4ab002d8
5 changed files with 126 additions and 91 deletions
11
pkg/login-validator/cmd/auth.go
Normal file
11
pkg/login-validator/cmd/auth.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
type AuthMethod interface {
|
||||
checkAuth(username, password string) (bool, error)
|
||||
}
|
||||
|
||||
type NoAuth struct {}
|
||||
|
||||
func (NoAuth) checkAuth(username, password string) (res bool, err error) {
|
||||
return true, nil
|
||||
}
|
||||
Reference in a new issue