當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Auth_OpenID_TrustRoot::match方法代碼示例

本文整理匯總了PHP中Auth_OpenID_TrustRoot::match方法的典型用法代碼示例。如果您正苦於以下問題:PHP Auth_OpenID_TrustRoot::match方法的具體用法?PHP Auth_OpenID_TrustRoot::match怎麽用?PHP Auth_OpenID_TrustRoot::match使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Auth_OpenID_TrustRoot的用法示例。


在下文中一共展示了Auth_OpenID_TrustRoot::match方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: trustRootValid

	function trustRootValid()
	{
		if (!$this->trust_root) {
			return true;
		}

		$tr = Auth_OpenID_TrustRoot::_parse($this->trust_root);
		if ($tr === false) {
			return new Auth_OpenID_MalformedTrustRoot($this->message,
			$this->trust_root);
		}

		if ($this->return_to !== null) {
			return Auth_OpenID_TrustRoot::match($this->trust_root,
			$this->return_to);
		} else {
			return true;
		}
	}
開發者ID:hoalangoc,項目名稱:ftf,代碼行數:19,代碼來源:Server.php

示例2: Auth_OpenID_AX_FetchRequest

 /**
  * Extract a FetchRequest from an OpenID message
  *
  * @param request: The OpenID request containing the attribute
  * fetch request
  *
  * @returns mixed An Auth_OpenID_AX_Error or the
  * Auth_OpenID_AX_FetchRequest extracted from the request message if
  * successful
  */
 function &fromOpenIDRequest($request)
 {
     $m = $request->message;
     $obj = new Auth_OpenID_AX_FetchRequest();
     $ax_args = $m->getArgs($obj->ns_uri);
     $result = $obj->parseExtensionArgs($ax_args);
     if (Auth_OpenID_AX::isError($result)) {
         return $result;
     }
     if ($obj->update_url) {
         // Update URL must match the openid.realm of the
         // underlying OpenID 2 message.
         $realm = $m->getArg(Auth_OpenID_OPENID_NS, 'realm', $m->getArg(Auth_OpenID_OPENID_NS, 'return_to'));
         if (!$realm) {
             $obj = new Auth_OpenID_AX_Error(sprintf("Cannot validate update_url %s " . "against absent realm", $obj->update_url));
         } else {
             if (!Auth_OpenID_TrustRoot::match($realm, $obj->update_url)) {
                 $obj = new Auth_OpenID_AX_Error(sprintf("Update URL %s failed validation against realm %s", $obj->update_url, $realm));
             }
         }
     }
     return $obj;
 }
開發者ID:kaantunc,項目名稱:MYK-BOR,代碼行數:33,代碼來源:AX.php

示例3: Auth_OpenID_returnToMatches

function Auth_OpenID_returnToMatches($allowed_return_to_urls, $return_to)
{
    foreach ($allowed_return_to_urls as $allowed_return_to) {
        // A return_to pattern works the same as a realm, except that
        // it's not allowed to use a wildcard. We'll model this by
        // parsing it as a realm, and not trying to match it if it has
        // a wildcard.
        $return_realm = Auth_OpenID_TrustRoot::_parse($allowed_return_to);
        if ($return_realm !== false && !$return_realm['wildcard'] && Auth_OpenID_TrustRoot::match($allowed_return_to, $return_to)) {
            return true;
        }
    }
    // No URL in the list matched
    return false;
}
開發者ID:kaantunc,項目名稱:MYK-BOR,代碼行數:15,代碼來源:TrustRoot.php

示例4: runTest

 function runTest()
 {
     $matches = Auth_OpenID_TrustRoot::match($this->tr, $this->rt);
     $this->assertEquals((bool) $this->matches, (bool) $matches);
 }
開發者ID:Jobava,項目名稱:diacritice-meta-repo,代碼行數:5,代碼來源:TrustRoot.php


注:本文中的Auth_OpenID_TrustRoot::match方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。