public virtual async Task Handle(string clientId, HandlerContext handlerContext, CancellationToken cancellationToken) { var oauthClient = await GetClient(clientId, handlerContext, cancellationToken); var searchResult = await _tokenQueryRepository.Find(new SearchTokenParameter { ClientId = clientId }, cancellationToken); if (searchResult.Content.Any()) { await _grantedTokenHelper.RemoveTokens(searchResult.Content, cancellationToken); Logger.LogInformation($"the tokens '{string.Join(",", searchResult.Content.Select(_ => _.Id))}' have been revoked"); } Logger.LogInformation($"the client '{clientId}' has been removed"); await OAuthClientCommandRepository.Delete(oauthClient, cancellationToken); }
public Task <SearchResult <Token> > SearchTokens(SearchTokenParameter parameter, CancellationToken cancellationToken) { return(_tokenQueryRepository.Find(parameter, cancellationToken)); }