Exemplo n.º 1
0
        public LoginResponse Login([FromBody] LoginRequest request)
        {
            LoginResponse response = new LoginResponse();

            response.IsAuthorised = false;
            try
            {
                BLUser user = new BLUser(request.Username, request.Password, request.CompanyName, Request.RequestUri.AbsolutePath);
                if (user != null)
                {
                    request.DecodeAuthToken();
                    CachingLayer.Insert <BLUser>(user, request.SID);
                    response.IsAuthorised = true;
                }
            }
            catch (ArgumentException ex) { }
            return(response);
        }