pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <bdo id='ACddw'></bdo><ul id='ACddw'></ul>
  • <i id='ACddw'><tr id='ACddw'><dt id='ACddw'><q id='ACddw'><span id='ACddw'><b id='ACddw'><form id='ACddw'><ins id='ACddw'></ins><ul id='ACddw'></ul><sub id='ACddw'></sub></form><legend id='ACddw'></legend><bdo id='ACddw'><pre id='ACddw'><center id='ACddw'></center></pre></bdo></b><th id='ACddw'></th></span></q></dt></tr></i><div class="wioiqco" id='ACddw'><tfoot id='ACddw'></tfoot><dl id='ACddw'><fieldset id='ACddw'></fieldset></dl></div>

    <legend id='ACddw'><style id='ACddw'><dir id='ACddw'><q id='ACddw'></q></dir></style></legend>

    1. <small id='ACddw'></small><noframes id='ACddw'>

      <tfoot id='ACddw'></tfoot>

        如何使用 Zend OpenID 實現基于直接身份的 OpenID 身

        How do I implement Direct Identity based OpenID authentication with Zend OpenID(如何使用 Zend OpenID 實現基于直接身份的 OpenID 身份驗證)
        <legend id='6IyKZ'><style id='6IyKZ'><dir id='6IyKZ'><q id='6IyKZ'></q></dir></style></legend>
          <bdo id='6IyKZ'></bdo><ul id='6IyKZ'></ul>

              <tfoot id='6IyKZ'></tfoot>

                    <tbody id='6IyKZ'></tbody>
                  <i id='6IyKZ'><tr id='6IyKZ'><dt id='6IyKZ'><q id='6IyKZ'><span id='6IyKZ'><b id='6IyKZ'><form id='6IyKZ'><ins id='6IyKZ'></ins><ul id='6IyKZ'></ul><sub id='6IyKZ'></sub></form><legend id='6IyKZ'></legend><bdo id='6IyKZ'><pre id='6IyKZ'><center id='6IyKZ'></center></pre></bdo></b><th id='6IyKZ'></th></span></q></dt></tr></i><div class="y0iy202" id='6IyKZ'><tfoot id='6IyKZ'></tfoot><dl id='6IyKZ'><fieldset id='6IyKZ'></fieldset></dl></div>

                  <small id='6IyKZ'></small><noframes id='6IyKZ'>

                  本文介紹了如何使用 Zend OpenID 實現基于直接身份的 OpenID 身份驗證的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 Zend 框架和來自 http://code 的 openid 選擇器.google.com/p/openid-selector/ - 但是我發現我無法使用像 Google 和 Yahoo 這樣的網站登錄,因為它們使用基于直接身份的登錄系統,其中一個只是重定向到一個 url,而不是輸入一個用于身份驗證的唯一網址.

                  I'm using the Zend framework and the openid selector from http://code.google.com/p/openid-selector/ - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authentication.

                  我檢查了許多選項和技巧,但似乎沒有一個有效.順便說一句,我怎樣才能讓它在這里工作 - 它是如何在堆棧溢出時實現的?我真的可以利用這里的所有幫助..

                  I've checked out many options and hacks but none of them seem to work. How can i get this to work here btw - how is it implemented at stack overflow? I could really use all the help here guys..

                  編輯

                  這里的問題是,我注意到 Zend OpenID 類不支持 OpenID 2.0,問題是典型的開放 ID 提供者為您提供了一個唯一的 URL,例如 your-name.openid-providor.com 或 openid-providor.com/your-name 和 Zend OpenId 類只是通過該 url 進行解析,然后將您重定向到提供者網站,在那里進行身份驗證后您將被重定向回來.

                  Well the issue here is that from what I have noticed is that the Zend OpenID class doesn't support OpenID 2.0 the thing is that a typical open ID providor gives you a unique url such as your-name.openid-providor.com or openid-providor.com/your-name and the Zend OpenId class just parses through that url and then redirects you to the providor website where upon authentication you are redirected back.

                  在雅虎和谷歌的情況下 - 你不輸入唯一的 url 而是你被重定向到提供者登錄站點,在登錄和身份驗證后你被重定向回來 - 所以基本上是什么是 zend_openID 對象解析時告訴誰是提供者,它無法從一般 url 本身中分辨出來.就像當您點擊 Google 鏈接時,它會將您重定向到 https://www.google.com/帳戶/o8/id

                  In the case of Yahoo and google - you don't enter a unique url instead you are redirected to the providors login site and upon login and authentication you are redirected back - so basically whats happeining is that the zend_openID object when it parses to tell who the providor is it fails to tell from the general url itself. Like when you click on teh Google link it redirects you to https://www.google.com/accounts/o8/id

                  這里更多是 zend openid 對象的問題,并且在 zend 相關論壇上沒有任何幫助 - 所以我想知道是否有人已經入侵或對類進行了更改以實現此目的.抱歉,如果我遺漏了一些東西,但我對此有點陌生,并且使用開放 ID 進行編程,并且剛剛開始涉足.

                  Its more an issue with the zend openid object here and there isn't any help on zend related forums - so I was wondering if someone had already hacked or had an alteration I could make to the class to accomplish this. Sorry if I'm missing something but I'm kinda new to this and programming with open ID and have just started to get my feet wet.

                  感謝您的跟進 - 不久前我確實檢查了 RPX,他們確實有一個 php 類,但我無法檢查它加上我現在真的只想讓在 stackoverflow 上使用的代碼選擇器工作與雅虎和谷歌身份驗證.必須有某種方法來調整 Zend OpenID 類使用的解析,因為它運行一系列正則表達式檢查以進行發現.

                  Thanks for the follow up - I did check into RPX a while back and they do have a php class but I wasnt able to check it out plus I really just want to for now get the code selector used as on stackoverflow to work with Yahoo and Google authentication. There has to be some kind of way to tweak the parsing which the Zend OpenID class uses as it runs a series of regular expression checks to make a discovery.

                  推薦答案

                  游戲有點晚了,但我能夠利用我在互聯網上發現的一些技巧來解決這個問題.

                  Little late to the game but I was able to get this working with some hacks I found around the interwebs.

                  首先.雅虎.為了讓 Yahoo 正常工作,我所要做的就是將 JavaScript 更改為使用 me.yahoo.com 而不是 yahoo.com 并且它與 Zend 版本完美配合我正在使用的框架.不幸的是,谷歌仍然沒有,所以需要進行一些黑客攻擊.

                  First. Yahoo. To get Yahoo working all I had to do was change the JavaScript to use me.yahoo.com instead of just yahoo.com and it worked perfectly with the version of the Zend Framework I'm using. Unfortunately Google still wasn't, so some hacking was in order.

                  所有這些更改都在 Zend/OpenId/Consumer.php

                  首先,在 _discovery 方法中,在從 740 行左右開始的一系列 preg_match 檢查中添加以下內容.

                  First, in the _discovery method add the following on the series of preg_match checks that starts at around line 740.

                  } else if (preg_match('/<URI>([^<]+)</URI>/i', $response, $r)) {
                      $version = 2.0;
                      $server = $r[1];
                  

                  我在 else {} 塊中的 return false; 語句之前添加了這個.

                  I added this right before the return false; statement that's in the else {} block.

                  其次,在 _checkId 方法中,您需要添加 3 個新塊(我還沒有深入了解導致調用這三種情況中的每一種的原因,因此我涵蓋了所有為了安全起見.

                  Second, in the _checkId method you'll need to add 3 new blocks (I haven't dug around enough to know what causes each of these three cases to be called, so I covered all to be on the safe side.

                  在 $version <= 2.0 塊中,您會發現一個 if/else if/else 塊.在第一個 if 語句 ($this->_session !== null) 中添加:

                  Inside the $version <= 2.0 block, you'll find an if/else if/else block. In the first if statement ($this->_session !== null) add this to the end:

                  if ($server == 'https://www.google.com/accounts/o8/ud') {
                      $this->_session->identity = 'http://specs.openid.net/auth/2.0/identifier_select';
                      $this->_session->claimed_id = 'http://specs.openid.net/auth/2.0/identifier_select';
                  }
                  

                  在 else if (defined('SID') 塊中將此添加到末尾:

                  In the else if (defined('SID') block add this to the end:

                  if ($server == 'https://www.google.com/accounts/o8/ud') {
                      $_SESSION['zend_openid']['identity'] = 'http://specs.openid.net/auth/2.0/identifier_select';
                      $_SESSION['zend_openid']['claimed_id'] = 'http://specs.openid.net/auth/2.0/identifier_select';
                  }
                  

                  然后在 else 塊之后(所以在 if/else if/else 塊之外,但仍在 $version <= 2.0 塊內)添加:

                  And then after the else block (so outside the if/else if/else block all together, but still inside the $version <= 2.0 block) add this:

                  if ($server == 'https://www.google.com/accounts/o8/ud') {
                      $params['openid.identity'] = 'http://specs.openid.net/auth/2.0/identifier_select';
                      $params['openid.claimed_id'] = 'http://specs.openid.net/auth/2.0/identifier_select';
                  }
                  

                  鏈接到 Zend 框架問題跟蹤器中的錯誤

                  這篇關于如何使用 Zend OpenID 實現基于直接身份的 OpenID 身份驗證的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <tfoot id='P9f08'></tfoot>
                      <tbody id='P9f08'></tbody>

                    <legend id='P9f08'><style id='P9f08'><dir id='P9f08'><q id='P9f08'></q></dir></style></legend>
                    <i id='P9f08'><tr id='P9f08'><dt id='P9f08'><q id='P9f08'><span id='P9f08'><b id='P9f08'><form id='P9f08'><ins id='P9f08'></ins><ul id='P9f08'></ul><sub id='P9f08'></sub></form><legend id='P9f08'></legend><bdo id='P9f08'><pre id='P9f08'><center id='P9f08'></center></pre></bdo></b><th id='P9f08'></th></span></q></dt></tr></i><div class="mumc2c2" id='P9f08'><tfoot id='P9f08'></tfoot><dl id='P9f08'><fieldset id='P9f08'></fieldset></dl></div>
                    • <small id='P9f08'></small><noframes id='P9f08'>

                      • <bdo id='P9f08'></bdo><ul id='P9f08'></ul>

                          1. 主站蜘蛛池模板: 硅PU球场、篮球场地面施工「水性、环保、弹性」硅PU材料生产厂家-广东中星体育公司 | 医用酒精_84消毒液_碘伏消毒液等医用消毒液-漓峰消毒官网 | 杭州实验室尾气处理_实验台_实验室家具_杭州秋叶实验设备有限公司 | 中空玻璃生产线,玻璃加工设备,全自动封胶线,铝条折弯机,双组份打胶机,丁基胶/卧式/立式全自动涂布机,玻璃设备-山东昌盛数控设备有限公司 | 棕刚玉-白刚玉厂家价格_巩义市东翔净水材料厂 | 脱硫搅拌器厂家-淄博友胜不锈钢搅拌器厂家 | 矿用履带式平板车|探水钻机|气动架柱式钻机|架柱式液压回转钻机|履带式钻机-启睿探水钻机厂家 | 发电机价格|发电机组价格|柴油发电机价格|柴油发电机组价格网 | 在线PH计-氧化锆分析仪-在线浊度仪-在线溶氧仪- 无锡朝达 | 超声波电磁流量计-液位计-孔板流量计-料位计-江苏信仪自动化仪表有限公司 | 臭氧发生器_臭氧消毒机 - 【同林品牌 实力厂家】 | 深圳激光打标机_激光打标机_激光焊接机_激光切割机_同体激光打标机-深圳市创想激光科技有限公司 深圳快餐店设计-餐饮设计公司-餐饮空间品牌全案设计-深圳市勤蜂装饰工程 | 低噪声电流前置放大器-SR570电流前置放大器-深圳市嘉士达精密仪器有限公司 | 铸铁平台,大理石平台专业生产厂家_河北-北重机械 | 短信通106短信接口验证码接口群发平台_国际短信接口验证码接口群发平台-速度网络有限公司 | 高压分散机(高压细胞破碎仪)百科-北京天恩瀚拓 | 澳威全屋定制官网|极简衣柜十大品牌|衣柜加盟代理|全屋定制招商 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 进口消泡剂-道康宁消泡剂-陶氏消泡剂-大洋消泡剂 | 厂房出租_厂房出售_产业园区招商_工业地产&nbsp;-&nbsp;中工招商网 | 517瓜水果特产网|一个专注特产好物的网站 | 天一线缆邯郸有限公司_煤矿用电缆厂家_矿用光缆厂家_矿用控制电缆_矿用通信电缆-天一线缆邯郸有限公司 | 土壤墒情监测站_土壤墒情监测仪_土壤墒情监测系统_管式土壤墒情站-山东风途物联网 | 合肥汽车充电桩_安徽充电桩_电动交流充电桩厂家_安徽科帝新能源科技有限公司 | 溶氧传感器-pH传感器|哈美顿(hamilton)| 污水/卧式/潜水/钻井/矿用/大型/小型/泥浆泵,价格,参数,型号,厂家 - 安平县鼎千泵业制造厂 | 恒湿机_除湿加湿一体机_恒湿净化消毒一体机厂家-杭州英腾电器有限公司 | 北京翻译公司_同传翻译_字幕翻译_合同翻译_英语陪同翻译_影视翻译_翻译盖章-译铭信息 | 焊锡,锡膏,锡线,锡条,焊锡膏-绿志岛金属有限公司 | 北京浩云律师事务所-法律顾问_企业法务_律师顾问_公司顾问 | 新能源汽车电池软连接,铜铝复合膜柔性连接,电力母排-容发智能科技(无锡)有限公司 | 地源热泵一体机,地源热泵厂家-淄博汇能环保设备有限公司 | 临时厕所租赁_玻璃钢厕所租赁_蹲式|坐式厕所出租-北京慧海通 | 123悬赏网_发布悬赏任务_广告任务平台 | 自动售货机_无人售货机_专业的自动售货机运营商_免费投放售货机-广州富宏主官网 | 多米诺-多米诺世界纪录团队-多米诺世界-多米诺团队培训-多米诺公关活动-多米诺创意广告-多米诺大型表演-多米诺专业赛事 | 济南玻璃安装_济南玻璃门_济南感应门_济南玻璃隔断_济南玻璃门维修_济南镜片安装_济南肯德基门_济南高隔间-济南凯轩鹏宇玻璃有限公司 | 工业风机_环保空调_冷风机_工厂车间厂房通风降温设备旺成服务平台 | 铝镁锰板_铝镁锰合金板_铝镁锰板厂家_铝镁锰金属屋面板_安徽建科 | 干粉砂浆设备-干粉砂浆生产线-干混-石膏-保温砂浆设备生产线-腻子粉设备厂家-国恒机械 | 压缩空气检测_气体_水质找上海京工-服务专业、价格合理 | 深圳活动策划公司|庆典策划|专业公关活动策划|深圳艺典文化传媒 重庆中专|职高|技校招生-重庆中专招生网 |