Add logger interface and stop relying on Logrus directly
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/dexidp/dex/pkg/log"
|
||||
)
|
||||
|
||||
// Tests for this code are in the "memory" package, since this package doesn't
|
||||
@@ -89,11 +89,11 @@ type staticPasswordsStorage struct {
|
||||
// A map of passwords that is indexed by lower-case email ids
|
||||
passwordsByEmail map[string]Password
|
||||
|
||||
logger logrus.FieldLogger
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
// WithStaticPasswords returns a storage with a read-only set of passwords.
|
||||
func WithStaticPasswords(s Storage, staticPasswords []Password, logger logrus.FieldLogger) Storage {
|
||||
func WithStaticPasswords(s Storage, staticPasswords []Password, logger log.Logger) Storage {
|
||||
passwordsByEmail := make(map[string]Password, len(staticPasswords))
|
||||
for _, p := range staticPasswords {
|
||||
//Enable case insensitive email comparison.
|
||||
|
Reference in New Issue
Block a user