當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SimpleSAML_Session::useTransientSession方法代碼示例

本文整理匯總了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;
開發者ID:danielkjfrog,項目名稱:docker,代碼行數:31,代碼來源:metarefresh.php


注:本文中的SimpleSAML_Session::useTransientSession方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。