Skip to content

Commit 7c1dfd1

Browse files
authored
Merge pull request kubernetes#83546 from Asalle/fix-golint-passwordfile
Fix golint in staging/src/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile
2 parents dde6e8e + 4920702 commit 7c1dfd1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ staging/src/k8s.io/apiserver/pkg/util/proxy
380380
staging/src/k8s.io/apiserver/pkg/util/webhook
381381
staging/src/k8s.io/apiserver/pkg/util/wsstream
382382
staging/src/k8s.io/apiserver/plugin/pkg/audit/log
383-
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile
384383
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc
385384
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/tokentest
386385
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook

staging/src/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/passwordfile.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"k8s.io/apiserver/pkg/authentication/user"
3232
)
3333

34+
// PasswordAuthenticator authenticates users by password
3435
type PasswordAuthenticator struct {
3536
users map[string]*userPasswordInfo
3637
}
@@ -81,6 +82,7 @@ func NewCSV(path string) (*PasswordAuthenticator, error) {
8182
return &PasswordAuthenticator{users}, nil
8283
}
8384

85+
// AuthenticatePassword returns user info if authentication is successful, nil otherwise
8486
func (a *PasswordAuthenticator) AuthenticatePassword(ctx context.Context, username, password string) (*authenticator.Response, bool, error) {
8587
user, ok := a.users[username]
8688
if !ok {

0 commit comments

Comments
 (0)