当前位置: 首页>>代码示例>>PHP>>正文


PHP SimpleSAML_Utilities::addURLParameter方法代码示例

本文整理汇总了PHP中SimpleSAML_Utilities::addURLParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleSAML_Utilities::addURLParameter方法的具体用法?PHP SimpleSAML_Utilities::addURLParameter怎么用?PHP SimpleSAML_Utilities::addURLParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleSAML_Utilities的用法示例。


在下文中一共展示了SimpleSAML_Utilities::addURLParameter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SimpleSAML_Error_BadRequest

<?php

/**
 * This is the page the user lands on when choosing "no" in the consent form.
 *
 * @package simpleSAMLphp
 * @version $Id$
 */
if (!array_key_exists('StateId', $_REQUEST)) {
    throw new SimpleSAML_Error_BadRequest('Missing required StateId query parameter.');
}
$id = $_REQUEST['StateId'];
$state = SimpleSAML_Auth_State::loadState($id, 'consent:request');
$resumeFrom = SimpleSAML_Module::getModuleURL('consent/getconsent.php');
$resumeFrom = SimpleSAML_Utilities::addURLParameter($resumeFrom, array('StateId' => $id));
$aboutService = NULL;
if (isset($state['Destination']['url.about'])) {
    $aboutService = $state['Destination']['url.about'];
}
$globalConfig = SimpleSAML_Configuration::getInstance();
$t = new SimpleSAML_XHTML_Template($globalConfig, 'consent:noconsent.php');
$t->data['dstMetadata'] = $state['Destination'];
$t->data['resumeFrom'] = $resumeFrom;
$t->data['aboutService'] = $aboutService;
$t->show();
开发者ID:hukumonline,项目名称:yii,代码行数:25,代码来源:noconsent.php

示例2: array

    $metaBuilder->addContact('technical', array('emailAddress' => $config->getString('technicalcontact_email', NULL), 'name' => $config->getString('technicalcontact_name', NULL)));
    $metaxml = $metaBuilder->getEntityDescriptorText();
    /* Sign the metadata if enabled. */
    $metaxml = SimpleSAML_Metadata_Signer::sign($metaxml, $spmeta, 'SAML 2 SP');
    /*
     * Generate list of IdPs that you can send metadata to.
     */
    $idplist = $metadata->getList('saml20-idp-remote');
    $idpsend = array();
    foreach ($idplist as $entityid => $mentry) {
        if (array_key_exists('send_metadata_email', $mentry)) {
            $idpsend[$entityid] = $mentry;
        }
    }
    $adminok = SimpleSAML_Utilities::isAdmin();
    $adminlogin = SimpleSAML_Utilities::getAdminLoginURL(SimpleSAML_Utilities::addURLParameter(SimpleSAML_Utilities::selfURLNoQuery(), array('output' => 'xhtml')));
    $sentok = FALSE;
    /*
     * Send metadata to Identity Provider, if the user filled submitted the form
     */
    if (array_key_exists('sendtoidp', $_POST)) {
        if (!array_key_exists($_POST['sendtoidp'], $idpsend)) {
            throw new Exception('Entity ID ' . $_POST['sendtoidp'] . ' not found in metadata. Cannot send metadata to this IdP.');
        }
        $emailadr = $idpsend[$_POST['sendtoidp']]['send_metadata_email'];
        $from = $_POST['email'];
        $message = '<h1>simpleSAMLphp SAML 2.0 Service Provider Metadata</h1>

<p>Metadata was sent to you from a simpleSAMLphp SAML 2.0 Service Provider. The service provider requests to connect to the following Identity Provider: 
	<ul>
		<li><tt>' . htmlentities($_POST['sendtoidp']) . '</tt></li>
开发者ID:hukumonline,项目名称:yii,代码行数:31,代码来源:metadata.php

示例3: checkCookie

 /**
  * Check for session cookie, and show missing-cookie page if it is missing.
  *
  * @param string|NULL $retryURL  The URL the user should access to retry the operation.
  */
 public static function checkCookie($retryURL = NULL)
 {
     assert('is_string($retryURL) || is_null($retryURL)');
     $session = SimpleSAML_Session::getInstance();
     if ($session->hasSessionCookie()) {
         return;
     }
     /* We didn't have a session cookie. Redirect to the no-cookie page. */
     $url = SimpleSAML_Module::getModuleURL('core/no_cookie.php');
     if ($retryURL !== NULL) {
         $url = SimpleSAML_Utilities::addURLParameter($url, array('retryURL' => $retryURL));
     }
     SimpleSAML_Utilities::redirect($url);
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-serviceregistry,代码行数:19,代码来源:Utilities.php

示例4: createPostRedirectLink

 /**
  * Create a link which will POST data.
  *
  * @param string $destination  The destination URL.
  * @param array $post  The name-value pairs which will be posted to the destination.
  * @return string  An URL which can be accessed to post the data.
  */
 public static function createPostRedirectLink($destination, $post)
 {
     assert('is_string($destination)');
     assert('is_array($post)');
     $id = SimpleSAML_Utilities::generateID();
     $postData = array('post' => $post, 'url' => $destination);
     $session = SimpleSAML_Session::getInstance();
     $session->setData('core_postdatalink', $id, $postData);
     return SimpleSAML_Utilities::addURLParameter(SimpleSAML_Module::getModuleURL('core/postredirect.php'), array('RedirId' => $id));
 }
开发者ID:hukumonline,项目名称:yii,代码行数:17,代码来源:Utilities.php


注:本文中的SimpleSAML_Utilities::addURLParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。