diff --git a/auth/auth.go b/auth/auth.go index 13e84cf..c3f2e00 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -23,7 +23,7 @@ type options struct { type Option func(opts *options) -func AuthsPeriodOption(auths map[string]string) Option { +func AuthsOption(auths map[string]string) Option { return func(opts *options) { opts.auths = auths } diff --git a/config/parsing/parse.go b/config/parsing/parse.go index d22b6f1..7153de1 100644 --- a/config/parsing/parse.go +++ b/config/parsing/parse.go @@ -40,7 +40,7 @@ func ParseAuther(cfg *config.AutherConfig) auth.Authenticator { } opts := []auth_impl.Option{ - auth_impl.AuthsPeriodOption(m), + auth_impl.AuthsOption(m), auth_impl.ReloadPeriodOption(cfg.Reload), auth_impl.LoggerOption(logger.Default().WithFields(map[string]any{ "kind": "auther", @@ -67,11 +67,15 @@ func ParseAutherFromAuth(au *config.AuthConfig) auth.Authenticator { return nil } return auth_impl.NewAuthenticator( - auth_impl.AuthsPeriodOption( + auth_impl.AuthsOption( map[string]string{ au.Username: au.Password, }, - )) + ), + auth_impl.LoggerOption(logger.Default().WithFields(map[string]any{ + "kind": "auther", + })), + ) } func parseAuth(cfg *config.AuthConfig) *url.Userinfo {