示例#1
0
        protected async Task <PandaDocHttpClient> EnsureLoggedIn()
        {
            var settings = new PandaDocHttpClientSettings();
            var client   = new PandaDocHttpClient(settings);

            PandaDocHttpResponse <PandaDocBearerToken> login = await client.Login(username : Username, password : Password);

            client.SetBearerToken(login.Value);

            return(client);
        }
示例#2
0
        protected async Task<PandaDocHttpClient> EnsureLoggedIn()
        {
            var settings = new PandaDocHttpClientSettings();
            var client = new PandaDocHttpClient(settings);

            PandaDocHttpResponse<PandaDocBearerToken> login = await client.Login(username: Username, password: Password);

            client.SetBearerToken(login.Value);

            return client;
        }
示例#3
0
        public async void LoginAsync()
        {
            using (var client = new PandaDocHttpClient())
            {
                PandaDocHttpResponse <PandaDocBearerToken> response = await client.Login(username : Username, password : Password);

                response.AssertOk();

                Assert.NotNull(response.Value.AccessToken);
                Assert.NotNull(response.Value.RefreshToken);
            }
        }
示例#4
0
        public void Login()
        {
            using (var client = new PandaDocHttpClient())
            {
                var response = client.Login(username: Username, password: Password).Result;

                response.AssertOk();

                Assert.NotNull(response.Value.AccessToken);
                Assert.NotNull(response.Value.RefreshToken);
            }
        }
        public async void LoginAsync()
        {
            using (var client = new PandaDocHttpClient())
            {
                PandaDocHttpResponse<PandaDocBearerToken> response = await client.Login(username: Username, password: Password);

                response.AssertOk();

                Assert.NotNull(response.Value.AccessToken);
                Assert.NotNull(response.Value.RefreshToken);
            }
        }
        public void Login()
        {
            using (var client = new PandaDocHttpClient())
            {
                var response = client.Login(username: Username, password: Password).Result;

                response.AssertOk();

                Assert.NotNull(response.Value.AccessToken);
                Assert.NotNull(response.Value.RefreshToken);
            }
        }