当前位置: 首页>>代码示例>>PHP>>正文


PHP Auth_OpenID_legacy_discover函数代码示例

本文整理汇总了PHP中Auth_OpenID_legacy_discover函数的典型用法代码示例。如果您正苦于以下问题:PHP Auth_OpenID_legacy_discover函数的具体用法?PHP Auth_OpenID_legacy_discover怎么用?PHP Auth_OpenID_legacy_discover使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Auth_OpenID_legacy_discover函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fromHTML

 function fromHTML($uri, $html)
 {
     // Parse the given document as HTML looking for an OpenID <link
     // rel=...>
     $urls = Auth_OpenID_legacy_discover($html);
     if ($urls === false) {
         return null;
     }
     list($delegate_url, $server_url) = $urls;
     $service = new Auth_OpenID_ServiceEndpoint();
     $service->identity_url = $uri;
     $service->delegate = $delegate_url;
     $service->server_url = $server_url;
     $service->type_uris = array(_OPENID_1_0_TYPE);
     return $service;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:16,代码来源:Discover.php

示例2: fromHTML

 static function fromHTML($uri, $html)
 {
     $discovery_types = array(array(Auth_OpenID_TYPE_2_0, 'openid2.provider', 'openid2.local_id'), array(Auth_OpenID_TYPE_1_1, 'openid.server', 'openid.delegate'));
     $services = array();
     foreach ($discovery_types as $triple) {
         list($type_uri, $server_rel, $delegate_rel) = $triple;
         $urls = Auth_OpenID_legacy_discover($html, $server_rel, $delegate_rel);
         if ($urls === false) {
             continue;
         }
         list($delegate_url, $server_url) = $urls;
         $service = new Auth_OpenID_ServiceEndpoint();
         $service->claimed_id = $uri;
         $service->local_id = $delegate_url;
         $service->server_url = $server_url;
         $service->type_uris = array($type_uri);
         $services[] = $service;
     }
     return $services;
 }
开发者ID:openid,项目名称:php-openid,代码行数:20,代码来源:Discover.php


注:本文中的Auth_OpenID_legacy_discover函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。