Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        /// <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));
        }
Esempio n. 3
0
 public async Task <AjaxResult> CreateSecretAsync([FromBody] SecretInputDto input)
 {
     return((await _clientContract.CreateSecretAsync(input)).ToAjaxResult());
 }