1
我正在使用DotNetOpenAuth在本地系統中實現OAuth。每次我收到以下錯誤:+400使用DotNetOpenAuth時的錯誤請求
ex.InnerException {"The remote server returned an error: (400) Bad Request."} System.Exception {System.Net.WebException}
下面是我的代碼片段
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被稱爲然後我得到的錯誤。無法弄清楚發生了什麼錯誤。可能的原因是什麼?