NTLM tests added NTLM licensing info added Avoid logging NTLM messages as it may contain sensitive information Renamed database authentication to NTLM as requested by bolkedebruin (see PR #109)
26 lines
529 B
Go
Executable File
26 lines
529 B
Go
Executable File
package database
|
|
|
|
import (
|
|
"github.com/bolkedebruin/rdpgw/cmd/auth/config"
|
|
)
|
|
|
|
type Config struct {
|
|
users map[string]config.UserConfig
|
|
}
|
|
|
|
func NewConfig(users []config.UserConfig) *Config {
|
|
usersMap := map[string]config.UserConfig{}
|
|
|
|
for _, user := range users {
|
|
usersMap[user.Username] = user
|
|
}
|
|
|
|
return &Config{
|
|
users: usersMap,
|
|
}
|
|
}
|
|
|
|
func (c *Config) GetPassword (username string) string {
|
|
return c.users[username].Password
|
|
}
|