2013-02-11 35 views
1

我正在建立一個網站,來自組織的人員將使用其組織提供的Google Apps帳戶登錄。該網站使用DotNetOpenAuth的標準OpenID示例代碼對Google OpenID提供商進行身份驗證。Google Apps OpenID端點提供了錯誤,但帶有Google Apps帳戶的標準Google端點可以發揮作用 - 有哪些功能?

OpenID是在這個谷歌Apps域啓用,但是當我試圖通過https://google.com/accounts/o8/site-xrds?hd=domain.com端點認證用戶,我得到以下錯誤:

Error occurred while sending a direct message or getting the response.

然而,如果我用標準https://www.google.com/accounts/o8/id端點使用我的Google Apps帳戶登錄,它可以正常工作!

爲什麼Google Apps帳戶產生兩個不同的結果:一個端點有效,另一個端點無法正確認證?

回答

1

Google Apps沒有完全遵循OpenID 2.0協議。它有一個專有的發現機制,DotNetOpenAuth默認沒有打開。在OpenIdRelyingPartyWebForms項目的loginGoogleApps.aspx文件中檢出the sample from SourceForge。您會看到它的代碼隱藏功能將Google Apps發現功能添加到OpenIdRelyingParty類中。如果你這樣做,我認爲它也適用於你。

相關問題