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); }
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; }
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); } }
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); } }