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


PHP SimpleSAML_Utilities::resolvePath方法代码示例

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


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

示例1: __construct

 /**
  * Initializes the SimpleSAML_MetaShare_Store object. Only called by the getInstance
  * singleton accessor.
  */
 private function __construct()
 {
     $metaConfig = SimpleSAML_Configuration::getConfig('metashare.php');
     $this->metadataPath = $metaConfig->getString('metashare.path');
     $this->metadataPath = SimpleSAML_Utilities::resolvePath($this->metadataPath);
     if (!is_dir($this->metadataPath)) {
         $ret = mkdir($this->metadataPath, 0755, TRUE);
         if (!$ret) {
             throw new Exception('Unable to create directory: ' . $this->metadataPath);
         }
     }
 }
开发者ID:hukumonline,项目名称:yii,代码行数:16,代码来源:Store.php

示例2: resolveCert

 /**
  * Resolves a path that may be relative to the cert-directory.
  *
  * @param string $path  The (possibly relative) path to the file.
  * @return string  The file path.
  */
 public static function resolveCert($path)
 {
     assert('is_string($path)');
     $globalConfig = SimpleSAML_Configuration::getInstance();
     $base = $globalConfig->getPathValue('certdir', 'cert/');
     return SimpleSAML_Utilities::resolvePath($path, $base);
 }
开发者ID:shirlei,项目名称:simplesaml,代码行数:13,代码来源:Utilities.php

示例3: __construct

 /**
  * Initialize this aggregator.
  *
  * @param string $id  The id of this aggregator.
  * @param SimpleSAML_Configuration $config  The configuration for this aggregator.
  */
 protected function __construct($id, SimpleSAML_Configuration $config)
 {
     assert('is_string($id)');
     $this->id = $id;
     $this->logLoc = 'aggregator2:' . $this->id . ': ';
     $this->cronTag = $config->getString('cron.tag', NULL);
     $this->cacheDirectory = $config->getString('cache.directory', NULL);
     if ($this->cacheDirectory !== NULL) {
         $this->cacheDirectory = SimpleSAML_Utilities::resolvePath($this->cacheDirectory);
     }
     $this->cacheGenerated = $config->getInteger('cache.generated', NULL);
     if ($this->cacheGenerated !== NULL) {
         $this->cacheId = sha1($this->id);
         $this->cacheTag = sha1(serialize($config));
     }
     // configure entity IDs excluded by default
     $this->excludeEntities($config->getArrayize('exclude', null));
     // configure filters
     $this->setFilters($config->getArrayize('filter', null));
     $this->validLength = $config->getInteger('valid.length', 7 * 24 * 60 * 60);
     $globalConfig = SimpleSAML_Configuration::getInstance();
     $certDir = $globalConfig->getPathValue('certdir', 'cert/');
     $signKey = $config->getString('sign.privatekey', NULL);
     if ($signKey !== NULL) {
         $signKey = SimpleSAML_Utilities::resolvePath($signKey, $certDir);
         $this->signKey = @file_get_contents($signKey);
         if ($this->signKey === NULL) {
             throw new SimpleSAML_Error_Exception('Unable to load private key from ' . var_export($signKey, TRUE));
         }
     }
     $this->signKeyPass = $config->getString('sign.privatekey_pass', NULL);
     $signCert = $config->getString('sign.certificate', NULL);
     if ($signCert !== NULL) {
         $signCert = SimpleSAML_Utilities::resolvePath($signCert, $certDir);
         $this->signCert = @file_get_contents($signCert);
         if ($this->signCert === NULL) {
             throw new SimpleSAML_Error_Exception('Unable to load certificate file from ' . var_export($signCert, TRUE));
         }
     }
     $this->sslCAFile = $config->getString('ssl.cafile', NULL);
     $this->regInfo = $config->getArray('RegistrationInfo', NULL);
     $this->initSources($config->getConfigList('sources'));
 }
开发者ID:DRvanR,项目名称:simplesamlphp,代码行数:49,代码来源:Aggregator.php

示例4: saveLogoutInfo

        SimpleSAML_Logger::warning('SAML2.0 - IdP.SingleLogoutService: Lost logout information.');
    }
}
/**
 * This function saves the logout info with the given ID.
 *
 * @param $id  The identifier the logout info should be saved with.
 */
function saveLogoutInfo($id)
{
    global $session;
    global $logoutInfo;
    $session->setData('idplogoutresponsedata', $id, $logoutInfo);
}
// Include XAJAX definition.
require_once SimpleSAML_Utilities::resolvePath('libextinc') . '/xajax/xajax.inc.php';
/*
 * This function is called via AJAX and will send LogoutRequest to one single SP by
 * sending a LogoutRequest using HTTP-REDIRECT
 */
function updateslostatus()
{
    SimpleSAML_Logger::info('SAML2.0 - IdP.SingleLogoutServiceiFrame: Accessing SAML 2.0 IdP endpoint SingleLogoutService (iFrame version) within updateslostatus() ');
    $config = SimpleSAML_Configuration::getInstance();
    $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
    $session = SimpleSAML_Session::getInstance();
    $idpentityid = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
    $templistofsps = $session->get_sp_list(SimpleSAML_Session::STATE_ONLINE);
    $listofsps = array();
    foreach ($templistofsps as $spentityid) {
        if (!empty($_COOKIE['spstate-' . sha1($spentityid)])) {
开发者ID:hukumonline,项目名称:yii,代码行数:31,代码来源:SingleLogoutServiceiFrame.php


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