本文整理汇总了PHP中SimpleSAML_Session::useTransientSession方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleSAML_Session::useTransientSession方法的具体用法?PHP SimpleSAML_Session::useTransientSession怎么用?PHP SimpleSAML_Session::useTransientSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleSAML_Session
的用法示例。
在下文中一共展示了SimpleSAML_Session::useTransientSession方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
#!/usr/bin/env php
<?php
/*
* This script can be used to generate metadata for simpleSAMLphp
* 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;