@@ -27,6 +27,7 @@ import (
2727 "github.com/tinyauthapp/tinyauth/internal/repository"
2828 "github.com/tinyauthapp/tinyauth/internal/utils"
2929 "github.com/tinyauthapp/tinyauth/internal/utils/logger"
30+ "github.com/tinyauthapp/tinyauth/pkg/cache"
3031 "go.uber.org/dig"
3132)
3233
@@ -158,9 +159,9 @@ type OIDCService struct {
158159 issuer string
159160
160161 caches struct {
161- code * CacheStore [AuthorizeCodeEntry ]
162- usedCode * CacheStore [UsedCodeEntry ]
163- authorize * CacheStore [AuthorizeRequest ]
162+ code * cache. CacheStore [AuthorizeCodeEntry ]
163+ usedCode * cache. CacheStore [UsedCodeEntry ]
164+ authorize * cache. CacheStore [AuthorizeRequest ]
164165 }
165166}
166167
@@ -339,11 +340,11 @@ func NewOIDCService(i OIDCServiceInput) (*OIDCService, error) {
339340 i .Ding .Go (service .cleanupRoutine , ding .RingMinor )
340341
341342 // Create caches
342- codeCash := NewCacheStore [AuthorizeCodeEntry ](256 )
343- usedCode := NewCacheStore [UsedCodeEntry ](256 )
344- authorize := NewCacheStore [AuthorizeRequest ](256 )
343+ codeCache := cache. NewCacheStore [AuthorizeCodeEntry ](256 )
344+ usedCode := cache. NewCacheStore [UsedCodeEntry ](256 )
345+ authorize := cache. NewCacheStore [AuthorizeRequest ](256 )
345346
346- service .caches .code = codeCash
347+ service .caches .code = codeCache
347348 service .caches .usedCode = usedCode
348349 service .caches .authorize = authorize
349350
@@ -503,7 +504,7 @@ func (service *OIDCService) GetCodeEntry(codeHash string, clientId string) (*Aut
503504 var entry AuthorizeCodeEntry
504505 var ok bool
505506
506- service .caches .code .WithLock (func (actions CacheStoreActions [AuthorizeCodeEntry ]) {
507+ service .caches .code .WithLock (func (actions cache. CacheStoreActions [AuthorizeCodeEntry ]) {
507508 entry , ok = actions .Get (codeHash )
508509
509510 if ! ok {
0 commit comments