ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SimpleSAML\Utils\Config Class Reference
+ Collaboration diagram for SimpleSAML\Utils\Config:

Static Public Member Functions

static getCertPath ($path)
 Resolves a path that may be relative to the cert-directory. More...
 
static getSecretSalt ()
 Retrieve the secret salt. More...
 

Detailed Description

Definition at line 9 of file Config.php.

Member Function Documentation

◆ getCertPath()

static SimpleSAML\Utils\Config::getCertPath (   $path)
static

Resolves a path that may be relative to the cert-directory.

Parameters
string$pathThe (possibly relative) path to the file.
Returns
string The file path.
Exceptions

Definition at line 22 of file Config.php.

References $base, $globalConfig, $path, SimpleSAML_Configuration\getInstance(), and SimpleSAML\Utils\System\resolvePath().

Referenced by SimpleSAML\XML\Signer\addCertificate(), SimpleSAML\Bindings\Shib13\Artifact\extractResponse(), SimpleSAML_Configuration\getPublicKeys(), SimpleSAML\XML\Signer\loadCertificate(), SimpleSAML\XML\Signer\loadPrivateKey(), SimpleSAML\Utils\Crypto\loadPrivateKey(), sspmod_adfs_IdP_ADFS\sendResponse(), SimpleSAML_Metadata_Signer\sign(), SimpleSAML\XML\Shib13\AuthnResponse\validate(), and SimpleSAML_Metadata_SAMLParser\validateSignature().

23  {
24  if (!is_string($path)) {
25  throw new \InvalidArgumentException('Invalid input parameters.');
26  }
27 
29  $base = $globalConfig->getPathValue('certdir', 'cert/');
31  }
$path
Definition: aliased.php:25
$base
Definition: index.php:4
$globalConfig
static resolvePath($path, $base=null)
Resolve a (possibly) relative path from the given base path.
Definition: System.php:118
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSecretSalt()

static SimpleSAML\Utils\Config::getSecretSalt ( )
static

Retrieve the secret salt.

This function retrieves the value which is configured as the secret salt. It will check that the value exists and is set to a non-default value. If it isn't, an exception will be thrown.

The secret salt can be used as a component in hash functions, to make it difficult to test all possible values in order to retrieve the original value. It can also be used as a simple method for signing data, by hashing the data together with the salt.

Returns
string The secret salt.
Exceptions

Definition at line 49 of file Config.php.

References SimpleSAML_Configuration\getInstance().

Referenced by SimpleSAML\Auth\TimeLimitedToken\__construct(), sspmod_consent_Consent_Store_Cookie\_sign(), SimpleSAML\Utils\Crypto\aesDecrypt(), SimpleSAML\Utils\Crypto\aesEncrypt(), sspmod_saml_IdP_SAML2\generateNameIdValue(), SimpleSAML_Utilities\getSecretSalt(), and sspmod_saml_Auth_Process_PersistentNameID\getValue().

50  {
51  $secretSalt = \SimpleSAML_Configuration::getInstance()->getString('secretsalt');
52  if ($secretSalt === 'defaultsecretsalt') {
53  throw new \InvalidArgumentException('The "secretsalt" configuration option must be set to a secret value.');
54  }
55 
56  return $secretSalt;
57  }
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: