public virtual async Task <ClientClaimDto> UpdateClaimAsync(ClientClaimUpdateDto clientClaimUpdate)
        {
            var client = await ClientRepository.GetAsync(clientClaimUpdate.ClientId);

            var clientClaim = client.Claims.FirstOrDefault(claim => claim.Type.Equals(clientClaimUpdate.Type));

            if (clientClaim == null)
            {
                throw new UserFriendlyException(L[AbpIdentityServerErrorConsts.ClientClaimNotFound, clientClaimUpdate.Type]);
            }
            clientClaim.Value = clientClaimUpdate.Value;

            return(ObjectMapper.Map <ClientClaim, ClientClaimDto>(clientClaim));
        }
Beispiel #2
0
 public virtual async Task <ClientClaimDto> UpdateClaimAsync(ClientClaimUpdateDto clientClaimUpdate)
 {
     return(await ClientAppService.UpdateClaimAsync(clientClaimUpdate));
 }