public async Task RemoveAsync(string key) { var persistedGrant = await _persistedgrantprovider.Get(key); if (persistedGrant != null) { await _persistedgrantprovider.Remove(key); } }
public Task RemoveAsync(string key) { var persistedGrant = _persistedgrantprovider.Get(key); if (persistedGrant != null) { _logger.LogDebug("removing {persistedGrantKey} persisted grant from database", key); try { _persistedgrantprovider.Remove(key); } catch (Exception ex) { _logger.LogInformation("exception removing {persistedGrantKey} persisted grant from database: {error}", key, ex.Message); } } else { _logger.LogDebug("no {persistedGrantKey} persisted grant found in database", key); } return(Task.FromResult(0)); }