Example #1
0
        public IActionResult Admin([FromBody] string password)
        {
            if (password != _adminOptions.AdminPassword)
            {
                throw new ArgumentException("Incorrect admin credentials");
            }

            return(Ok(_tokenGenerator.GenerateAdminToken()));
        }