2013-10-18 172 views
0

我建DotNetOpenAuth項目從GitHub分支\ V5.0的\ src \最新發布並運行了OAuth2示例應用程序。我從localhost:59722開始驗證樣本AuthorizationServer & ResourceServer。我必須在下面的三個.cs文件中進行更改才能使示例工作。如果有人知道是否存在已知問題或者我缺少一些配置,我將不勝感激。的OAuth 2.0樣品DotNetOpenAuth不起作用

  1. OAuthClient項目:SampleWCF2.cs:註釋掉64行:

    的Response.Redirect(Request的);

  2. 產品/ DotNetOpenAuth.OAuth2項目:AccessToken.cs:註釋掉第54行:

    Requires.That(!signingKey == NULL || signingKey.PublicOnly, 「signingKey」, 「需要私鑰」) ;

  3. 產品/ DotNetOpenAth.OAuth2.Client項目:OAuth2ClientChannel.cs添加在102線:

    //hack added to because contentType of text/html is returned for json 
    if(contentType == "text/html" && body != null && body[0] == '{') 
    { 
        return this.DeserializeFromJson(body); 
    }else if (contentType == JsonEncoded || contentType == JsonTextEncoded) { 
    

回答

0

我碰到一個問題,跑了,同時運行本地主機。大多數情況下,這是因爲Facebook不會重定向到本地主機。我必須在我的主機文件中添加一行來僞造一個真正的域。

相關問題