コード例 #1
0
        private void Login()
        {
            //WE CREATE A MODEL AND A SERVICE
            var getValues = $"{Username} {Password}";
            var authModel = new DtoAuthModel
            {
                Password = Password,
                UserName = Username
            };

            //faking a call to webservice
            var authenticated = _authenticationService.AuthenticateUserPassword(authModel);

            if (authenticated)
            {
                //navigate to page wherever you want
                App.Current.MainPage.Navigation.PushAsync(new DataEntryPage());
            }

            Console.WriteLine(getValues);
        }
コード例 #2
0
        public bool AuthenticateUserPassword(DtoAuthModel authModel)
        {
            //You might call your webservice here to authenticate

            return(true); //for test sake, we return true
        }