(ctx context.Context, clientID, tokenHash string)
| 71 | } |
| 72 | |
| 73 | func (s *Store) DeleteOAuth2RefreshToken(ctx context.Context, clientID, tokenHash string) error { |
| 74 | q := qb.Q().Space(` |
| 75 | DELETE FROM oauth2_refresh_token |
| 76 | WHERE token_hash = ? AND client_id = ? |
| 77 | `, tokenHash, clientID) |
| 78 | |
| 79 | query, args, err := q.ToSQL() |
| 80 | if err != nil { |
| 81 | return err |
| 82 | } |
| 83 | |
| 84 | if _, err := s.GetDB().ExecContext(ctx, query, args...); err != nil { |
| 85 | return errors.Wrap(err, "failed to delete OAuth2 refresh token") |
| 86 | } |
| 87 | return nil |
| 88 | } |
| 89 | |
| 90 | func (s *Store) DeleteOAuth2RefreshTokensByUserAndClient(ctx context.Context, userEmail, clientID string) error { |
| 91 | q := qb.Q().Space(` |
no test coverage detected