Ejemplo n.º 1
0
        public static async Task <Podio> GetPodioAndUserLogin()
        {
            Podio      podio = GetPodio();
            PodioOAuth oAuth = await podio.AuthenticateWithPassword(LoginSettings.UserName, LoginSettings.Password);

            return(podio);
        }
Ejemplo n.º 2
0
        public async Task IsAuthenticatedTest()
        {
            Podio podio = TestUtility.GetPodio();

            Assert.IsFalse(podio.IsAuthenticated());
            await podio.AuthenticateWithPassword(TestUtility.LoginSettings.UserName, TestUtility.LoginSettings.Password);

            Assert.IsTrue(podio.IsAuthenticated());
        }
Ejemplo n.º 3
0
        public async Task OrgTest()
        {
            Podio           _Podio;
            StaticAuthStore _AuthStore;

            _AuthStore = new StaticAuthStore();
            _Podio     = new Podio(Settings.ClientId, Settings.ClientSecret, _AuthStore);
            await _Podio.AuthenticateWithPassword("username", "password");

            Assert.IsTrue(_Podio.IsAuthenticated());

            var orgs = await _Podio.OrganizationService.GetOrganizations();

            Assert.IsNotNull(orgs);
        }
Ejemplo n.º 4
0
        private static async Task <Podio> AuthenticatePodio()
        {
            var podio = new Podio("nyltformcapture", Secrets.PodioAppSecret);
            var vault = new Windows.Security.Credentials.PasswordVault();
            //if (vault.FindAllByResource("nyltformcapture").Count == 0)
            //{
            //    await Utilities.ShowPodioCredentialDialog();
            //}
            var credentials = vault.FindAllByResource("nyltformcapture");

            if (credentials.Count > 0)
            {
                var credential = credentials.FirstOrDefault();
                credential.RetrievePassword();
                await podio.AuthenticateWithPassword(credential.UserName, credential.Password);

                return(podio);
            }
            throw new Exception("There are no relevant credentials stored.");
        }