示例#1
0
        public IHttpActionResult GetLogin()
        {
            if (_sessionProvider.IsSessionActive() == false)
            {
                return(Unauthorized());
            }

            var user = _sessionProvider.GetSessionUser();

            if (user == null)
            {
                return(Unauthorized());
            }

            var result = new LoginResponse {
                SessionToken = _sessionProvider.GetSessionToken(), User = Map(user)
            };

            return(Ok(result));
        }