resort imports
This commit is contained in:
@@ -13,9 +13,8 @@ import (
|
||||
"time"
|
||||
|
||||
bolt "github.com/coreos/bbolt"
|
||||
"github.com/go-pkgz/lgr"
|
||||
log "github.com/go-pkgz/lgr"
|
||||
acache "github.com/patrickmn/go-cache"
|
||||
auth_cache "github.com/patrickmn/go-cache"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/go-pkgz/auth"
|
||||
@@ -553,7 +552,7 @@ func (s *ServerCommand) makeAuthenticator(ds *service.DataStore, avas avatar.Sto
|
||||
AvatarStore: avas,
|
||||
AvatarResizeLimit: s.Avatar.RszLmt,
|
||||
AvatarRoutePath: "/api/v1/avatar",
|
||||
Logger: lgr.Default(),
|
||||
Logger: log.Default(),
|
||||
RefreshCache: newAuthRefreshCache(),
|
||||
})
|
||||
s.addAuthProviders(authenticator)
|
||||
@@ -562,11 +561,11 @@ func (s *ServerCommand) makeAuthenticator(ds *service.DataStore, avas avatar.Sto
|
||||
|
||||
// authRefreshCache used by authenticator to minimize repeatable token refreshes
|
||||
type authRefreshCache struct {
|
||||
*acache.Cache
|
||||
*auth_cache.Cache
|
||||
}
|
||||
|
||||
func newAuthRefreshCache() *authRefreshCache {
|
||||
return &authRefreshCache{Cache: acache.New(5*time.Minute, 10*time.Minute)}
|
||||
return &authRefreshCache{Cache: auth_cache.New(5*time.Minute, 10*time.Minute)}
|
||||
}
|
||||
|
||||
func (c *authRefreshCache) Get(key interface{}) (interface{}, bool) {
|
||||
@@ -574,5 +573,5 @@ func (c *authRefreshCache) Get(key interface{}) (interface{}, bool) {
|
||||
}
|
||||
|
||||
func (c *authRefreshCache) Set(key, value interface{}) {
|
||||
c.Cache.Set(key.(string), value, acache.DefaultExpiration)
|
||||
c.Cache.Set(key.(string), value, auth_cache.DefaultExpiration)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user