Beispiel #1
0
        public IActionResult Get()
        {
            var headerValues = this.HttpContext.Request.Headers;
            var email        = headerValues["email"];
            var password     = headerValues["password"];

            if (sessionLogic.IsValidAdmin(email, password))
            {
                string token = sessionLogic.GetAdminToken();
                return(Ok(new ResponseMessage {
                    Message = token
                }));
            }
            return(BadRequest("Wrong Email or Password"));
        }