public async Task <OperationResponse> CreateApiResourceSecretAsync(SecretInputDto input) { input.NotNull(nameof(input)); var entity = await _apiResourceDomainService.GetLoadAsync(input.Id); entity.AddSecrets(new ApiResourceSecret(input.Value, input.Type, null)); return(await _apiResourceDomainService.UpdateAsync(entity)); }
/// <summary> /// 客户端密钥 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <OperationResponse> CreateSecretAsync(SecretInputDto input) { input.NotNull(nameof(input)); var cliententity = await _clientDomainService.GetLoadByIdAsync(input.Id); //cliententity.AddClientSecrets(new ClientSecret("", input.Value.Sha256(), input.Type, null)); return(await _clientDomainService.UpdateAsync(cliententity)); }
public async Task <AjaxResult> CreateSecretAsync([FromBody] SecretInputDto input) { return((await _clientContract.CreateSecretAsync(input)).ToAjaxResult()); }