Skip to content

Commit 7652ddc

Browse files
committed
chore: unexport UserPassAuthenticator.Users
1 parent e1df8aa commit 7652ddc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extras/auth/userpass.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var _ server.Authenticator = &UserPassAuthenticator{}
1616
// UserPassAuthenticator checks the provided auth string against a map of username/password pairs.
1717
// The format of the auth string must be "username:password".
1818
type UserPassAuthenticator struct {
19-
Users map[string]string
19+
users map[string]string
2020
}
2121

2222
func NewUserPassAuthenticator(users map[string]string) *UserPassAuthenticator {
@@ -26,15 +26,15 @@ func NewUserPassAuthenticator(users map[string]string) *UserPassAuthenticator {
2626
for user, pass := range users {
2727
lcUsers[strings.ToLower(user)] = pass
2828
}
29-
return &UserPassAuthenticator{Users: lcUsers}
29+
return &UserPassAuthenticator{users: lcUsers}
3030
}
3131

3232
func (a *UserPassAuthenticator) Authenticate(addr net.Addr, auth string, tx uint64) (ok bool, id string) {
3333
u, p, ok := splitUserPass(auth)
3434
if !ok {
3535
return false, ""
3636
}
37-
rp, ok := a.Users[u]
37+
rp, ok := a.users[u]
3838
if !ok || rp != p {
3939
return false, ""
4040
}

0 commit comments

Comments
 (0)