當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。