24 if (!is_string(
$path)) {
25 throw new \InvalidArgumentException(
'Invalid input parameters.');
52 if ($secretSalt ===
'defaultsecretsalt') {
53 throw new \InvalidArgumentException(
'The "secretsalt" configuration option must be set to a secret value.');
67 public static function getConfigDir()
69 $configDir = dirname(dirname(dirname(__DIR__))) .
'/config';
71 $configDirEnv = getenv(
'SIMPLESAMLPHP_CONFIG_DIR');
73 if($configDirEnv ===
false) {
74 $configDirEnv = getenv(
'REDIRECT_SIMPLESAMLPHP_CONFIG_DIR');
77 if ($configDirEnv !==
false) {
78 if (!is_dir($configDirEnv)) {
79 throw new \InvalidArgumentException(
81 'Config directory specified by environment variable SIMPLESAMLPHP_CONFIG_DIR is not a ' .
82 'directory. Given: "%s"',
87 $configDir = $configDirEnv;
static getSecretSalt()
Retrieve the secret salt.
static resolvePath($path, $base=null)
Resolve a (possibly) relative path from the given base path.
static getCertPath($path)
Resolves a path that may be relative to the cert-directory.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.