php Auth_OpenID_discoverXRI类(方法)实例源码

下面列出了php Auth_OpenID_discoverXRI 类(方法)源码代码实例,从而了解它的用法。

作者:openi    项目:php-openi   
function Auth_OpenID_discover($uri, $fetcher)
{
    // If the fetcher (i.e., PHP) doesn't support SSL, we can't do
    // discovery on an HTTPS URL.
    if ($fetcher->isHTTPS($uri) && !$fetcher->supportsSSL()) {
        return array($uri, array());
    }
    if (Auth_Yadis_identifierScheme($uri) == 'XRI') {
        $result = Auth_OpenID_discoverXRI($uri, $fetcher);
    } else {
        $result = Auth_OpenID_discoverURI($uri, $fetcher);
    }
    // If the fetcher doesn't support SSL, we can't interact with
    // HTTPS server URLs; remove those endpoints from the list.
    if (!$fetcher->supportsSSL()) {
        $http_endpoints = array();
        list($new_uri, $endpoints) = $result;
        foreach ($endpoints as $e) {
            if (!$fetcher->isHTTPS($e->server_url)) {
                $http_endpoints[] = $e;
            }
        }
        $result = array($new_uri, $http_endpoints);
    }
    return $result;
}

作者:BGCX06    项目:ezopenid-svn-to-gi   
function test_xriNoCanonicalID()
 {
     list($user_xri, $services) = Auth_OpenID_discoverXRI('=smoker*bad');
     $this->assertFalse($services);
 }


问题


面经


文章

微信
公众号

扫码关注公众号