【发布时间】:2015-08-18 21:03:09
【问题描述】:
我正在使用 DotNetOpenAuth 在我的本地系统中实现 OAuth。每次我收到以下错误:+
ex.InnerException {"The remote server returned an error: (400) Bad Request."} System.Exception {System.Net.WebException}
下面是我的代码sn-p
AuthorizationServerDescription authServer = new AuthorizationServerDescription()
{
TokenEndpoint = new Uri(TOKEN_ENDPOINT),
AuthorizationEndpoint = new Uri(AUTHZ_ENDPOINT),
};
string[] scopes = new string[] { "Scope" };
var client = new WebServerClient(authServer , "ClientId", "Client_Secret");
var token= client.ExchangeUserCredentialForToken("username", "password");
当调用 client.ExchangeUserCredentialForToken 时,我收到错误消息。无法弄清楚发生了什么错误。可能的原因是什么?
【问题讨论】:
标签: c# oauth https oauth-2.0 dotnetopenauth