当前位置: 首页>>代码示例>>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;未经允许,请勿转载。