예제 #1
0
        public AuthUserResponse CreateScreen(AuthUserRequest request)
        {
            var response = new AuthUserResponse();

            try
            {
                response.Success     = true;
                response.Message     = null;
                response.IsAuthed    = false;
                response.CurrentUser = null;

                //Call the Service Layer
                BookyService s      = new BookyService();
                bool         isauth = s.AuthenticateUser(request.Username, request.PasswordHash);
                //todo..create the response..see tb
                if (isauth)
                {
                    //Get the user
                    //s.GetUser
                    //response.IsAuthed = true;
                }
                //todo get the user object
            }
            catch (Exception ex)
            {
                response.ErrorCode = ErrorCodes.WebServiceCall;
                response.Message   = ex.Message;
                response.Success   = false;
            }
            return(response);
        }
예제 #2
0
        public AuthUserResponse CreateScreen(AuthUserRequest request)
        {
            var response = new AuthUserResponse();

            try
            {
                response.Success = true;
                response.Message = null;
                response.IsAuthed = false;
                response.CurrentUser = null;

                //Call the Service Layer
                BookyService s = new BookyService();
                bool isauth = s.AuthenticateUser(request.Username, request.PasswordHash);
                //todo..create the response..see tb
                if (isauth)
                {
                    //Get the user
                    //s.GetUser
                    //response.IsAuthed = true;

                }
                //todo get the user object
            }
            catch (Exception ex)
            {
                response.ErrorCode = ErrorCodes.WebServiceCall;
                response.Message = ex.Message;
                response.Success = false;
            }
            return response;
        }