我正在使用LightOpenID,並有一個測試頁,它附帶的example-google.php的附近副本(我將一些回聲放入調試中)。點擊「使用Google登錄」按鈕會將我帶到Google。我使用有效的Google Apps電子郵件地址登錄,然後返回到我的頁面。但是當它試圖驗證claims_id時,我得到了'找不到服務器!'信息。Lightopenid + Google Apps + validate()=找不到服務器!
我已經使用這個短語作爲指導,但大多數回覆只是gitorious checkins的鏈接。我寫入代碼,使用fwrites顯示代碼按以下順序執行...
(由於我放入的所有調試代碼,我的行號可能有點偏離)
openid.php:validate()被調用。在validate()中,第568行是這一行...
$server = $this->discover($this->data['openid_identity']);
在此行之後,$ server是空的, ''。
我可以證明,在探索($網址)開始,變量
$url = http://<my Google Apps domain>.com/openid?id=117665028262121597341
的問題是沒有被設置爲364行(openid.php)是$服務器,當htmlTag()叫做。同樣的$ url是爲$內容被抓取的,但是這個URL返回一個404,然後在htmlTag()中失敗了pregs()
$ url是不正確的?它是從'openid_identity'直接設置的,我認爲它來自Google Apps。
以下是成功登錄Google Apps後返回的網址。
http://intranet.<my domain>.com/<my path>/validate.php?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Fa%2F<my Google App domain>%2Fo8%2Fud%3Fbe%3Do8&openid.response_nonce=2010-10-25T04%3A23%3A26ZFQ4Fq3F3W1b9ug&openid.return_to=http%3A%2F%2Fintranet.<my domain>.com%2F<my path>%2Fvalidate.php&openid.assoc_handle=AOQobUeErcWBdJC6slZm3nCw_BRbvHTjpdtycleA2P89n15QCCr8fRDE&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=yrja2H%2Fvufp2BqezN4NIVGA5wWM%3D&openid.identity=http%3A%2F%2F<my Google App domain>%2Fopenid%3Fid%3D117665028262121597341&openid.claimed_id=http%3A%2F%2F<my Google App domain>%2Fopenid%3Fid%3D117665028262121597341
我是新來OpenID的東西,所以短語或鏈接指向我在這裏正確的方向將不勝感激。
感謝, 埃裏克B.
雖然我對Google Apps瞭解不多,但身份網址必須是可發現的,即包含有關openid服務器的信息。因此,如果它返回404,LightOpenID無法發現服務器,因此無法執行驗證。 – Mewp 2010-10-25 10:12:43