コード例 #1
0
        private async void GenerateToken()
        {
            var retorno = await AccessControlService.GetUserToken(
                new User
            {
                AccessKey = UserLogin.AccessKey,
                UserID    = UserLogin.UserID
            }
                );

            if (retorno.IsSuccess)
            {
                await DialogService.DisplayAlertAsync("Sucesso", "Acesso Autorizado", "Ok");

                Settings.Token = retorno.Content.AccessToken;
                await NavigationService.NavigateAsync(BaseAppPageLinks.InicialPage);
            }
            else
            {
                await DialogService.DisplayAlertAsync("Negado", retorno.Message, "Ok");
            }
        }