mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-07 14:05:50 +00:00
Upgrade the linter and fix all new linter warnings
Also fix some tests that were broken by bumping golang and dependencies in the previous commits. Note that in addition to changes made to satisfy the linter which do not impact the behavior of the code, this commit also adds ReadHeaderTimeout to all usages of http.Server to satisfy the linter (and because it seemed like a good suggestion).
This commit is contained in:
@@ -10,22 +10,22 @@ import (
|
||||
"k8s.io/apiserver/pkg/authentication/user"
|
||||
)
|
||||
|
||||
// This interface is similar to the k8s token authenticator, but works with username/passwords instead
|
||||
// UserAuthenticator is an interface is similar to the k8s token authenticator, but works with username/passwords instead
|
||||
// of a single token string.
|
||||
//
|
||||
// The return values should be as follows.
|
||||
// 1. For a successful authentication:
|
||||
// - A response which includes the username, uid, and groups in the userInfo. The username and uid must not be blank.
|
||||
// - true
|
||||
// - nil error
|
||||
// - A response which includes the username, uid, and groups in the userInfo. The username and uid must not be blank.
|
||||
// - true
|
||||
// - nil error
|
||||
// 2. For an unsuccessful authentication, e.g. bad username or password:
|
||||
// - nil response
|
||||
// - false
|
||||
// - nil error
|
||||
// - nil response
|
||||
// - false
|
||||
// - nil error
|
||||
// 3. For an unexpected error, e.g. a network problem:
|
||||
// - nil response
|
||||
// - false
|
||||
// - an error
|
||||
// - nil response
|
||||
// - false
|
||||
// - an error
|
||||
// Other combinations of return values must be avoided.
|
||||
//
|
||||
// See k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go for the token authenticator
|
||||
|
||||
Reference in New Issue
Block a user