File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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".
1818type UserPassAuthenticator struct {
19- Users map [string ]string
19+ users map [string ]string
2020}
2121
2222func 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
3232func (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 }
You can’t perform that action at this time.
0 commit comments