trustRootValid() public method

public trustRootValid ( )
Exemplo n.º 1
0
	function make(&$message, $identity, $return_to, $trust_root = null,
	$immediate = false, $assoc_handle = null, $server = null)
	{
		if ($server === null) {
			return new Auth_OpenID_ServerError($message,
                                               "server must not be null");
		}

		if ($return_to &&
		!Auth_OpenID_TrustRoot::_parse($return_to)) {
			return new Auth_OpenID_MalformedReturnURL($message, $return_to);
		}

		$r = new Auth_OpenID_CheckIDRequest($identity, $return_to,
		$trust_root, $immediate,
		$assoc_handle, $server);

		$r->namespace = $message->getOpenIDNamespace();
		$r->message =& $message;

		if (!$r->trustRootValid()) {
			return new Auth_OpenID_UntrustedReturnURL($message,
			$return_to,
			$trust_root);
		} else {
			return $r;
		}
	}
Exemplo n.º 2
0
 function make($query, $identity, $return_to, $trust_root = null, $immediate = false, $assoc_handle = null)
 {
     if (!Auth_OpenID_TrustRoot::_parse($return_to)) {
         return new Auth_OpenID_MalformedReturnURL($query, $return_to);
     }
     $r = new Auth_OpenID_CheckIDRequest($identity, $return_to, $trust_root, $immediate, $assoc_handle);
     if (!$r->trustRootValid()) {
         return new Auth_OpenID_UntrustedReturnURL($return_to, $trust_root);
     } else {
         return $r;
     }
 }