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


PHP Auth_OpenID_makeOpenIDEndpoints函数代码示例

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


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

示例1: runTest

 function runTest()
 {
     // Parse into endpoint objects that we will check
     $xrds_object = Auth_Yadis_XRDS::parseXRDS($this->xrds);
     $endpoints = array();
     if ($xrds_object) {
         $endpoints = $xrds_object->services(array('filter_MatchesAnyOpenIDType'));
         $endpoints = Auth_OpenID_makeOpenIDEndpoints($this->yadis_url, $endpoints);
     }
     // make sure there are the same number of endpoints as
     // URIs. This assumes that the type_uris contains at least one
     // OpenID type.
     $this->assertEquals(count($this->uris), count($endpoints), "URI <-> Endpoint count");
     // So that we can check equality on the endpoint types
     $type_uris = $this->type_uris;
     sort($type_uris);
     $seen_uris = array();
     foreach ($endpoints as $endpoint) {
         $seen_uris[] = $endpoint->server_url;
         // All endpoints will have same yadis_url
         $this->assertEquals($this->yadis_url, $endpoint->claimed_id);
         // and delegate
         $this->assertEquals($this->local_id, $endpoint->local_id);
         // and types
         $actual_types = $endpoint->type_uris;
         sort($actual_types);
         $this->assertEquals($actual_types, $type_uris);
     }
     // So that they will compare equal, because we don't care what
     // order they are in
     sort($seen_uris);
     $uris = $this->uris;
     sort($uris);
     // Make sure we saw all URIs, and saw each one once
     $this->assertEquals($uris, $seen_uris);
 }
开发者ID:BGCX067,项目名称:ezopenid-svn-to-git,代码行数:36,代码来源:OpenID_Yadis.php

示例2: discover_user

 function discover_user($domain, $claimed_id, $fetcher)
 {
     $site_url = $this->fetch_host_meta($domain, $fetcher);
     if ($site_url == null) {
         return;
     }
     $site_xrds = $this->fetch_xrds_services($domain, $site_url, $fetcher);
     list($user_url, $next_authority) = $this->get_user_xrds_url($site_xrds, $claimed_id);
     $user_xrds = $this->fetch_xrds_services($next_authority, $user_url, $fetcher, false);
     if ($user_xrds != null) {
         $services = $user_xrds->services(array('filter_MatchesAnyOpenIDType'));
         $endpoints = Auth_OpenID_makeOpenIDEndpoints($claimed_id, $services);
         return array($claimed_id, $endpoints);
     }
 }
开发者ID:remotelearner,项目名称:elis.openid,代码行数:15,代码来源:google_discovery.php

示例3: _Auth_OpenID_discoverXRI

function _Auth_OpenID_discoverXRI($iname, &$fetcher)
{
    $services = new Services_Yadis_ProxyResolver($fetcher);
    list($canonicalID, $service_list) = $services->query($iname, array(_OPENID_1_0_TYPE, _OPENID_1_1_TYPE, _OPENID_1_2_TYPE), array('filter_MatchesAnyOpenIDType'));
    $endpoints = Auth_OpenID_makeOpenIDEndpoints($iname, $service_list);
    for ($i = 0; $i < count($endpoints); $i++) {
        $endpoints[$i]->canonicalID = $canonicalID;
    }
    // FIXME: returned xri should probably be in some normal form
    return array($iname, $endpoints, null);
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:11,代码来源:Discover.php

示例4: fromXRDS

 static function fromXRDS($uri, $xrds_text)
 {
     $xrds = Auth_Yadis_XRDS::parseXRDS($xrds_text);
     if ($xrds) {
         $yadis_services = $xrds->services(array('filter_MatchesAnyOpenIDType'));
         return Auth_OpenID_makeOpenIDEndpoints($uri, $yadis_services);
     }
     return null;
 }
开发者ID:openid,项目名称:php-openid,代码行数:9,代码来源:Discover.php

示例5: Auth_OpenID_discoverXRI

function Auth_OpenID_discoverXRI($iname, &$fetcher)
{
    $resolver = new Auth_Yadis_ProxyResolver($fetcher);
    list($canonicalID, $yadis_services) = $resolver->query($iname, Auth_OpenID_getOpenIDTypeURIs(), array('filter_MatchesAnyOpenIDType'));
    $openid_services = Auth_OpenID_makeOpenIDEndpoints($iname, $yadis_services);
    $openid_services = Auth_OpenID_getOPOrUserServices($openid_services);
    for ($i = 0; $i < count($openid_services); $i++) {
        $openid_services[$i]->canonicalID = $canonicalID;
        $openid_services[$i]->claimed_id = $canonicalID;
    }
    // FIXME: returned xri should probably be in some normal form
    return array($iname, $openid_services);
}
开发者ID:ramziammar,项目名称:websites,代码行数:13,代码来源:Discover.php


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