diff options
Diffstat (limited to 'internal/authentication/file_user_provider.go')
| -rw-r--r-- | internal/authentication/file_user_provider.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/authentication/file_user_provider.go b/internal/authentication/file_user_provider.go index 02e0faa81..0dd84e085 100644 --- a/internal/authentication/file_user_provider.go +++ b/internal/authentication/file_user_provider.go @@ -25,7 +25,7 @@ type FileUserProvider struct { config *schema.AuthenticationBackendFile hash algorithm.Hash database FileUserProviderDatabase - mutex *sync.Mutex + mutex sync.Mutex timeoutReload time.Time } @@ -33,7 +33,6 @@ type FileUserProvider struct { func NewFileUserProvider(config *schema.AuthenticationBackendFile) (provider *FileUserProvider) { return &FileUserProvider{ config: config, - mutex: &sync.Mutex{}, timeoutReload: time.Now().Add(-1 * time.Second), database: NewFileUserDatabase(config.Path, config.Search.Email, config.Search.CaseInsensitive, getExtra(config)), } @@ -77,6 +76,10 @@ func (p *FileUserProvider) Reload() (reloaded bool, err error) { return true, nil } +func (p *FileUserProvider) Shutdown() (err error) { + return nil +} + // CheckUserPassword checks if provided password matches for the given user. func (p *FileUserProvider) CheckUserPassword(username string, password string) (match bool, err error) { var details FileUserDatabaseUserDetails |
