public async Task <ActionResult> Callback(string code) { var auth = new AuthenticationClient(); await auth.WebServerAsync(_clientId, _clientSecret, _callbackUrl, code); Session["ApiVersion"] = auth.ApiVersion; Session["AccessToken"] = auth.AccessToken; Session["RefreshToken"] = auth.RefreshToken; var client = new UberClient(TokenTypes.Access, auth.AccessToken, "v1", new HttpClient()); var userActivity = await client.UserActivityAsync(); var user = await client.UserAsync(); return(RedirectToAction("Index", "Home")); }
public void UserActivity_Fail_ServerToken() { var client = new UberClient(""); Assert.That(async() => await client.UserActivityAsync(), Throws.InstanceOf <ArgumentException>()); }
public void UserActivity_Fail_ServerToken() { var client = new UberClient(""); Assert.That(async () => await client.UserActivityAsync(), Throws.InstanceOf<ArgumentException>()); }