public async Task <ClientDto> GetAsync(string clientId, IEnumerable <string> allowedClientIds = null) { if (allowedClientIds != null && !allowedClientIds.Contains(clientId)) { throw new IamException(HttpStatusCode.BadRequest, "无权操作"); } var client = await _clientRepo.GetAsync(clientId); return(client == null ? null : _mapper.Map <ClientDto>(client)); }