public async Task <IActionResult> AddApiResourceSecretAsync(string subject, ApiResourceSecretValue model)
        {
            if (string.IsNullOrWhiteSpace(subject))
            {
                ModelState["subject.String"].Errors.Clear();
                ModelState.AddModelError("", Messages.SubjectRequired);
            }

            if (model == null)
            {
                ModelState.AddModelError("", Messages.ApiResourceSecretNeeded);
            }

            if (ModelState.IsValid)
            {
                var result = await _service.AddSecretAsync(subject, model.Type, model.Value, model.Description, model.Expiration);

                if (result.IsSuccess)
                {
                    return(NoContent());
                }

                ModelState.AddErrors(result);
            }

            return(BadRequest(ModelState.ToError()));
        }