Example #1
0
        public IActionResult GenerateKeyForUser(string userName, int keySize)
        {
            if (!userName.NotEmpty())
            {
                return(BadRequest());
            }

            try
            {
                var user = _signService.GenerateUserSigningKey(userName, keySize);

                return(Json(user));
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }