@@ -175,7 +175,7 @@ func (provider *provider) RotateToken(ctx context.Context, accessToken string, r
175175}
176176
177177func (provider * provider ) DeleteToken (ctx context.Context , accessToken string ) error {
178- provider .cache .Delete (ctx , emptyOrgID , cachetypes . NewSha1CacheKey (accessToken ))
178+ provider .cache .Delete (ctx , emptyOrgID , accessTokenCacheKey (accessToken ))
179179 if err := provider .tokenStore .DeleteByAccessToken (ctx , accessToken ); err != nil {
180180 return err
181181 }
@@ -190,7 +190,7 @@ func (provider *provider) DeleteTokensByUserID(ctx context.Context, userID value
190190 }
191191
192192 for _ , token := range tokens {
193- provider .cache .Delete (ctx , emptyOrgID , cachetypes . NewSha1CacheKey (token .AccessToken ))
193+ provider .cache .Delete (ctx , emptyOrgID , accessTokenCacheKey (token .AccessToken ))
194194 }
195195
196196 if err := provider .tokenStore .DeleteByUserID (ctx , userID ); err != nil {
@@ -201,7 +201,7 @@ func (provider *provider) DeleteTokensByUserID(ctx context.Context, userID value
201201}
202202
203203func (provider * provider ) DeleteIdentity (ctx context.Context , userID valuer.UUID ) error {
204- provider .cache .Delete (ctx , emptyOrgID , "identity::" + userID . String ( ))
204+ provider .cache .Delete (ctx , emptyOrgID , identityCacheKey ( userID ))
205205 return nil
206206}
207207
0 commit comments