Delete removes a refresh token from storage
(ctx context.Context, token string)
| 76 | |
| 77 | // Delete removes a refresh token from storage |
| 78 | func (s *InMemoryRefreshTokenStore) Delete(ctx context.Context, token string) error { |
| 79 | if token == "" { |
| 80 | return nil // No error for empty token deletion |
| 81 | } |
| 82 | |
| 83 | s.mu.Lock() |
| 84 | defer s.mu.Unlock() |
| 85 | |
| 86 | delete(s.tokens, token) |
| 87 | return nil |
| 88 | } |
| 89 | |
| 90 | // Cleanup removes expired tokens and returns the number of tokens cleaned up |
| 91 | func (s *InMemoryRefreshTokenStore) Cleanup(ctx context.Context) (int, error) { |
no outgoing calls