{"The remote server returned an error: (400) Bad Request."} at System.Net.HttpWebRequest.GetResponse() at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) in c:\BuildAgent\work\a02b428f36957bca\src\DotNetOpenAuth\Messaging\StandardWebRequestHandler.cs:line 126 public static readonly ServiceProviderDescription ServiceDescription = new ServiceProviderDescription { RequestTokenEndpoint = new MessageReceivingEndpoint("https://www.google.com/account/OAuthGetRequestToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest), UserAuthorizationEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthAuthorizeToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest), AccessTokenEndpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthGetAccessToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest), TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new HmacSha1SigningBindingElement() }, }; public void StartOAuth() { var consumer = new WebConsumer(GoogleConsumer.ServiceDescription, new InMemoryTokenManager("user", "pass")); // Url to redirect to var authUrl = new Uri("http://www.google.com"); // request access consumer.Channel.Send(consumer.PrepareRequestUserAuthorization(authUrl, null, null)); throw new NoRedirectToAuthPageException(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)