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


PHP SimpleSAML_Configuration::setConfigDir方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * Note that the person is tied to a OAuth datastore here
  */
 function __construct($person = NULL)
 {
     parent::__construct($person);
     /* Find the path to simpelsamlphp and run the autoloader */
     try {
         $sspdir = Config::get_config('simplesaml_path');
     } catch (KeyNotFoundException $knfe) {
         echo "Cannot find path to simplesaml. This install is not valid. Aborting.<br />\n";
         Logger::log_event(LOG_ALERT, "Trying to instantiate simpleSAMLphp without a configured path.");
         exit(0);
     }
     require_once $sspdir . '/lib/_autoload.php';
     SimpleSAML_Configuration::setConfigDir($sspdir . '/config');
     $this->oauthStore = new OAuthDataStore_Confusa();
     $this->oauthServer = new sspmod_oauth_OAuthServer($this->oauthStore);
     $hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
     $this->oauthServer->add_signature_method($hmac_method);
     $req = OAuthRequest::from_request();
     list($consumer, $this->accessToken) = $this->oauthServer->verify_request($req);
     $this->isAuthenticated = isset($this->accessToken);
 }
开发者ID:henrikau,项目名称:confusa,代码行数:26,代码来源:Confusa_Auth_OAuth.php

示例2: dirname

 * based on an XML metadata file.
 */
/* This is the base directory of the simpleSAMLphp installation. */
$baseDir = dirname(dirname(dirname(dirname(__FILE__))));
/* Add library autoloader. */
require_once $baseDir . '/lib/_autoload.php';
SimpleSAML_Session::useTransientSession();
/* No need to try to create a session here. */
if (!SimpleSAML_Module::isModuleEnabled('metarefresh')) {
    echo "You need to enable the metarefresh module before this script can be used.\n";
    echo "You can enable it by running the following command:\n";
    echo '  echo >"' . $baseDir . '/modules/metarefresh/enable' . "\"\n";
    exit(1);
}
/* Initialize the configuration. */
SimpleSAML_Configuration::setConfigDir($baseDir . '/config');
/* $outputDir contains the directory we will store the generated metadata in. */
$outputDir = $baseDir . '/metadata-generated';
/* $toStdOut is a boolean telling us wheter we will print the output to stdout instead
 * of writing it to files in $outputDir.
 */
$toStdOut = FALSE;
/* $validateFingerprint contains the fingerprint of the certificate which should have been used
 * to sign the EntityDescriptor in the metadata, or NULL if fingerprint validation shouldn't be
 * done.
 */
$validateFingerprint = NULL;
/* This variable contains the files we will parse. */
$files = array();
/* Parse arguments. */
$progName = array_shift($argv);
开发者ID:danielkjfrog,项目名称:docker,代码行数:31,代码来源:metarefresh.php

示例3: dirname

#!/usr/bin/env php
<?php 
/* This is the base directory of the simpleSAMLphp installation. */
$baseDir = dirname(dirname(dirname(dirname(__FILE__))));
/* Add library autoloader. */
require_once $baseDir . '/lib/_autoload.php';
/* Initialize the configuration. */
$configdir = SimpleSAML\Utils\Config::getConfigDir();
SimpleSAML_Configuration::setConfigDir($configdir);
SimpleSAML\Utils\Time::initTimezone();
$progName = array_shift($argv);
$debug = FALSE;
$dryrun = FALSE;
foreach ($argv as $a) {
    if (strlen($a) === 0) {
        continue;
    }
    if (strpos($a, '=') !== FALSE) {
        $p = strpos($a, '=');
        $v = substr($a, $p + 1);
        $a = substr($a, 0, $p);
    } else {
        $v = NULL;
    }
    /* Map short options to long options. */
    $shortOptMap = array('-d' => '--debug');
    if (array_key_exists($a, $shortOptMap)) {
        $a = $shortOptMap[$a];
    }
    switch ($a) {
        case '--help':
开发者ID:tractorcow,项目名称:simplesamlphp,代码行数:31,代码来源:loganalyzer.php

示例4: getDiscoPath

 public function getDiscoPath()
 {
     $sspdir = Config::get_config('simplesaml_path');
     require_once $sspdir . 'lib/_autoload.php';
     SimpleSAML_Configuration::setConfigDir($sspdir . '/config');
     $sspConfig = SimpleSAML_Configuration::getInstance();
     $discoPath = "https://" . $_SERVER['SERVER_NAME'] . "/" . $sspConfig->getString('baseurlpath') . "module.php/saml/disco.php?" . $_SERVER['QUERY_STRING'];
     return $discoPath;
 }
开发者ID:henrikau,项目名称:confusa,代码行数:9,代码来源:Confusa_Auth_IdP.php


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