ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($config, $location) | |
Initializes a configuration from the given array. More... | |
copyFromBase ($instancename, $filename) | |
Load a configuration file which is located in the same directory as this configuration file. More... | |
getVersion () | |
Retrieve the current version of SimpleSAMLphp. More... | |
getValue ($name, $default=null) | |
Retrieve a configuration option set in config.php. More... | |
hasValue ($name) | |
Check whether a key in the configuration exists or not. More... | |
hasValueOneOf ($names) | |
Check whether any key of the set given exists in the configuration. More... | |
getBaseURL () | |
Retrieve the absolute path of the SimpleSAMLphp installation, relative to the root of the website. More... | |
getBasePath () | |
Retrieve the absolute path pointing to the SimpleSAMLphp installation. More... | |
resolvePath ($path) | |
This function resolves a path which may be relative to the SimpleSAMLphp base directory. More... | |
getPathValue ($name, $default=null) | |
Retrieve a path configuration option set in config.php. More... | |
getBaseDir () | |
Retrieve the base directory for this SimpleSAMLphp installation. More... | |
getBoolean ($name, $default=self::REQUIRED_OPTION) | |
This function retrieves a boolean configuration option. More... | |
getString ($name, $default=self::REQUIRED_OPTION) | |
This function retrieves a string configuration option. More... | |
getInteger ($name, $default=self::REQUIRED_OPTION) | |
This function retrieves an integer configuration option. More... | |
getIntegerRange ($name, $minimum, $maximum, $default=self::REQUIRED_OPTION) | |
This function retrieves an integer configuration option where the value must be in the specified range. More... | |
getValueValidate ($name, $allowedValues, $default=self::REQUIRED_OPTION) | |
Retrieve a configuration option with one of the given values. More... | |
getArray ($name, $default=self::REQUIRED_OPTION) | |
This function retrieves an array configuration option. More... | |
getArrayize ($name, $default=self::REQUIRED_OPTION) | |
This function retrieves an array configuration option. More... | |
getArrayizeString ($name, $default=self::REQUIRED_OPTION) | |
This function retrieves a configuration option with a string or an array of strings. More... | |
getConfigItem ($name, $default=self::REQUIRED_OPTION) | |
Retrieve an array as a SimpleSAML_Configuration object. More... | |
getConfigList ($name, $default=self::REQUIRED_OPTION) | |
Retrieve an array of arrays as an array of SimpleSAML_Configuration objects. More... | |
getOptions () | |
Retrieve list of options. More... | |
toArray () | |
Convert this configuration object back to an array. More... | |
getEndpoints ($endpointType) | |
Helper function for dealing with metadata endpoints. More... | |
getEndpointPrioritizedByBinding ($endpointType, array $bindings, $default=self::REQUIRED_OPTION) | |
Find an endpoint of the given type, using a list of supported bindings as a way to prioritize. More... | |
getDefaultEndpoint ($endpointType, array $bindings=null, $default=self::REQUIRED_OPTION) | |
Find the default endpoint of the given type. More... | |
getLocalizedString ($name, $default=self::REQUIRED_OPTION) | |
Retrieve a string which may be localized into many languages. More... | |
getPublicKeys ($use=null, $required=false, $prefix='') | |
Get public key from metadata. More... | |
Static Public Member Functions | |
static | setConfigDir ($path, $configSet='simplesaml') |
Set the directory for configuration files for the given configuration set. More... | |
static | getConfig ($filename='config.php', $configSet='simplesaml') |
Load a configuration file from a configuration set. More... | |
static | getOptionalConfig ($filename='config.php', $configSet='simplesaml') |
Load a configuration file from a configuration set. More... | |
static | loadFromArray ($config, $location='[ARRAY]', $instance=null) |
Loads a configuration from the given array. More... | |
static | getInstance ($instancename='simplesaml') |
Get a configuration file by its instance name. More... | |
static | init ($path, $instancename='simplesaml', $configfilename='config.php') |
Initialize a instance name with the given configuration file. More... | |
static | clearInternalState () |
Clear any configuration information cached. More... | |
Data Fields | |
const | REQUIRED_OPTION = '___REQUIRED_OPTION___' |
Private Member Functions | |
getDefaultBinding ($endpointType) | |
Retrieve the default binding for the given endpoint type. More... | |
Static Private Member Functions | |
static | loadFromFile ($filename, $required) |
Load the given configuration file. More... | |
Private Attributes | |
$configuration | |
$location | |
$filename = null | |
$deprecated_base_url_used = false | |
Static Private Attributes | |
static | $instance = array() |
static | $configDirs = array() |
static | $loadedConfigs = array() |
Definition at line 10 of file Configuration.php.
SimpleSAML_Configuration::__construct | ( | $config, | |
$location | |||
) |
Initializes a configuration from the given array.
array | $config | The configuration array. |
string | $location | The location which will be given when an error occurs. |
Definition at line 88 of file Configuration.php.
References $config, and $location.
|
static |
Clear any configuration information cached.
Allows for configuration files to be changed and reloaded during a given request. Most useful when running phpunit tests and needing to alter config.php between test cases
Implements SimpleSAML\Utils\ClearableState.
Definition at line 1374 of file Configuration.php.
References array.
SimpleSAML_Configuration::copyFromBase | ( | $instancename, | |
$filename | |||
) |
Load a configuration file which is located in the same directory as this configuration file.
TODO: remove.
string | $instancename | |
string | $filename |
Definition at line 364 of file Configuration.php.
SimpleSAML_Configuration::getArray | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves an array configuration option.
An exception will be thrown if this option isn't an array, or if this option isn't found, and no default value is given.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not an array. |
Definition at line 857 of file Configuration.php.
References $name, $ret, and getValue().
Referenced by SimpleSAML_Metadata_SAMLBuilder\addAttributeConsumingService(), SimpleSAML_Metadata_SAMLBuilder\addExtensions(), sspmod_saml_IdP_SAML2\encodeAttributes(), SimpleSAML\XML\Shib13\AuthnResponse\generate(), sspmod_saml_Message\getBlacklistedAlgorithms(), getPublicKeys(), SAML2\Configuration\SimpleSAMLConverter\pluckConfiguration(), and sspmod_saml_Auth_Source_SP\startSSO2().
SimpleSAML_Configuration::getArrayize | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves an array configuration option.
If the configuration option isn't an array, it will be converted to an array.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Definition at line 888 of file Configuration.php.
References $name, $ret, array, and getValue().
Referenced by getArrayizeString().
SimpleSAML_Configuration::getArrayizeString | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves a configuration option with a string or an array of strings.
If the configuration option is a string, it will be converted to an array with a single string
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not a string or an array of strings. |
Definition at line 921 of file Configuration.php.
References $name, $ret, and getArrayize().
Referenced by sspmod_saml_Message\buildAuthnRequest(), sspmod_saml_Message\checkSign(), SimpleSAML\Utils\Crypto\loadPublicKey(), and SAML2\Configuration\SimpleSAMLConverter\pluckConfiguration().
SimpleSAML_Configuration::getBaseDir | ( | ) |
Retrieve the base directory for this SimpleSAMLphp installation.
This function first checks the 'basedir' configuration option. If this option is undefined or null, then we fall back to looking at the current filename.
Definition at line 600 of file Configuration.php.
References getString().
Referenced by resolvePath().
SimpleSAML_Configuration::getBasePath | ( | ) |
Retrieve the absolute path pointing to the SimpleSAMLphp installation.
The path is guaranteed to start and end with a slash ('/'). E.g.: /simplesaml/
SimpleSAML |
Definition at line 491 of file Configuration.php.
References getString(), SimpleSAML\Utils\HTTP\guessBasePath(), and toArray().
SimpleSAML_Configuration::getBaseURL | ( | ) |
Retrieve the absolute path of the SimpleSAMLphp installation, relative to the root of the website.
For example: simplesaml/
The path will always end with a '/' and never have a leading slash.
SimpleSAML |
Definition at line 466 of file Configuration.php.
SimpleSAML_Configuration::getBoolean | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves a boolean configuration option.
An exception will be thrown if this option isn't a boolean, or if this option isn't found, and no default value is given.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not boolean. |
Definition at line 648 of file Configuration.php.
References $name, $ret, and getValue().
Referenced by sspmod_saml_Message\addRedirectSign(), sspmod_saml_IdP_SAML2\buildAssertion(), sspmod_saml_Message\buildAuthnRequest(), sspmod_saml_IdP_SAML2\buildLogoutRequest(), sspmod_saml_IdP_SAML2\buildResponse(), sspmod_statistics_AccessCheck\checkAccess(), sspmod_saml_Message\decryptAssertion(), sspmod_saml_IdP_SAML2\encodeAttributes(), sspmod_saml_IdP_SAML2\encryptAssertion(), SAML2\Configuration\SimpleSAMLConverter\enrichForDecryptionProvider(), SAML2\Configuration\SimpleSAMLConverter\enrichForIdentityProvider(), SimpleSAML\XML\Shib13\AuthnResponse\generate(), SAML2\Configuration\SimpleSAMLConverter\pluckConfiguration(), sspmod_saml_Message\processAssertion(), SimpleSAML\Bindings\Shib13\HTTPPost\sendResponse(), sspmod_saml_Auth_Source_SP\startSSO1(), and sspmod_saml_Message\validateMessage().
|
static |
Load a configuration file from a configuration set.
string | $filename | The name of the configuration file. |
string | $configSet | The configuration set. Optional, defaults to 'simplesaml'. |
Exception | If the configuration set is not initialized. |
Definition at line 209 of file Configuration.php.
Referenced by sspmod_statistics_LogCleaner\__construct(), SimpleSAML\Module\cron\Cron\__construct(), sspmod_statistics_Aggregator\__construct(), sspmod_riak_Store_Store\__construct(), sspmod_multiauth_Auth_Source_MultiAuth\__construct(), SimpleSAML_AuthMemCookie\__construct(), sspmod_cdc_Server\__construct(), sspmod_discopower_PowerIdPDisco\__construct(), sspmod_ldap_Auth_Process_BaseFilter\__construct(), cron_hook_cron(), SimpleSAML_Auth_Source\getById(), SimpleSAML_Auth_Source\getSourcesOfType(), statistics_hook_cron(), and statistics_hook_sanitycheck().
SimpleSAML_Configuration::getConfigItem | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
Retrieve an array as a SimpleSAML_Configuration object.
This function will load the value of an option into a SimpleSAML_Configuration object. The option must contain an array.
An exception will be thrown if this option isn't an array, or if this option isn't found, and no default value is given.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not an array. |
Definition at line 963 of file Configuration.php.
References $name, $ret, and getValue().
SimpleSAML_Configuration::getConfigList | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
Retrieve an array of arrays as an array of SimpleSAML_Configuration objects.
This function will retrieve an option containing an array of arrays, and create an array of SimpleSAML_Configuration objects from that array. The indexes in the new array will be the same as the original indexes, but the values will be SimpleSAML_Configuration objects.
An exception will be thrown if this option isn't an array of arrays, or if this option isn't found, and no default value is given.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the value of this element is not an array. |
Definition at line 1004 of file Configuration.php.
References $config, $index, $name, $out, $ret, array, and getValue().
|
private |
Retrieve the default binding for the given endpoint type.
This function combines the current metadata type (SAML 2 / SAML 1.1) with the endpoint type to determine which binding is the default.
string | $endpointType | The endpoint type. |
Exception | If the default binding is missing for this endpoint type. |
Definition at line 1073 of file Configuration.php.
References getString().
Referenced by getEndpoints().
SimpleSAML_Configuration::getDefaultEndpoint | ( | $endpointType, | |
array | $bindings = null , |
||
$default = self::REQUIRED_OPTION |
|||
) |
Find the default endpoint of the given type.
string | $endpointType | The endpoint type. |
array | $bindings | Array with acceptable bindings. Can be null if any binding is allowed. |
mixed | $default | The default value to return if no matching endpoint is found. If no default is provided, an exception will be thrown. |
Exception | If no supported endpoint is found. |
Definition at line 1222 of file Configuration.php.
References $bindings, and getEndpoints().
Referenced by SimpleSAML\Bindings\Shib13\Artifact\extractResponse(), sspmod_saml_IdP_SAML2\getAssertionConsumerService(), and sspmod_saml_Auth_Source_SP\startSSO2().
SimpleSAML_Configuration::getEndpointPrioritizedByBinding | ( | $endpointType, | |
array | $bindings, | ||
$default = self::REQUIRED_OPTION |
|||
) |
Find an endpoint of the given type, using a list of supported bindings as a way to prioritize.
string | $endpointType | The endpoint type. |
array | $bindings | Sorted array of acceptable bindings. |
mixed | $default | The default value to return if no matching endpoint is found. If no default is provided, an exception will be thrown. |
Exception | If no supported endpoint is found. |
Definition at line 1187 of file Configuration.php.
References $binding, and getEndpoints().
SimpleSAML_Configuration::getEndpoints | ( | $endpointType | ) |
Helper function for dealing with metadata endpoints.
string | $endpointType | The endpoint type. |
Exception | If any element of the configuration options for this endpoint type is incorrect. |
Definition at line 1106 of file Configuration.php.
References $eps, $i, array, getDefaultBinding(), and getString().
Referenced by sspmod_saml_IdP_SAML2\getAssertionConsumerService(), getDefaultEndpoint(), and getEndpointPrioritizedByBinding().
|
static |
Get a configuration file by its instance name.
This function retrieves a configuration file by its instance name. The instance name is initialized by the init function, or by copyFromBase function.
If no configuration file with the given instance name is found, an exception will be thrown.
string | $instancename | The instance name of the configuration file. Deprecated. |
Exception | If the configuration with $instancename name is not initialized. |
Definition at line 297 of file Configuration.php.
Referenced by sspmod_core_Storage_SQLPermanentStorage\__construct(), ilSimpleSAMLphplIdpDiscovery\__construct(), ilSimpleSAMLphpWrapper\__construct(), SimpleSAML_Metadata_MetaDataStorageHandlerXML\__construct(), SimpleSAML_Metadata_MetaDataStorageHandlerSerialize\__construct(), SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile\__construct(), SimpleSAML\SessionHandlerCookie\__construct(), SimpleSAML\SessionHandlerPHP\__construct(), sspmod_multiauth_Auth_Source_MultiAuth\__construct(), SimpleSAML_Auth_ProcessingChain\__construct(), SimpleSAML_Metadata_MetaDataStorageHandler\__construct(), SimpleSAML_IdP\__construct(), SimpleSAML\Metadata\Sources\MDQ\__construct(), sspmod_core_Auth_UserPassBase\__construct(), SimpleSAML_XHTML_IdPDisco\__construct(), SimpleSAML_Session\__construct(), sspmod_consent_Consent_Store_Cookie\_setConsentCookie(), sspmod_authX509_Auth_Source_X509userCert\authFailed(), sspmod_saml_IdP_SAML2\buildAssertion(), SimpleSAML\Utils\XML\checkSAMLMessage(), core_hook_sanitycheck(), sspmod_metarefresh_MetaLoader\createContext(), SimpleSAML\Logger\createLoggingHandler(), SimpleSAML\Utils\XML\debugSAMLMessage(), SimpleSAML_Session\doLogin(), SimpleSAML_Error_Exception\formatBacktrace(), SimpleSAML\Utils\Config\getCertPath(), SimpleSAML\SessionHandler\getCookieParams(), SimpleSAML\SessionHandlerPHP\getCookieParams(), sspmod_statistics_StatDataset\getDelimiterPresentation(), SimpleSAML_Memcache\getExpireTime(), SimpleSAML_Metadata_MetaDataStorageHandler\getGenerated(), SimpleSAML\Store\getInstance(), SimpleSAML\Database\getInstance(), SimpleSAML\Locale\Language\getLanguageCookie(), SimpleSAML_Memcache\getMemcacheServers(), sspmod_portal_Portal\getMenu(), SimpleSAML\Utils\Config\getSecretSalt(), SimpleSAML_Session\getSession(), SimpleSAML_Session\getSessionFromRequest(), SimpleSAML_Auth_State\getStateTimeout(), SimpleSAML\Utils\System\getTempDir(), SimpleSAML_Stats\initOutputs(), SimpleSAML\Utils\Time\initTimezone(), SimpleSAML\Utils\XML\isDOMNodeOfType(), sspmod_metarefresh_ARP\loadAttributeMap(), sspmod_core_Auth_Process_AttributeMap\loadMapFile(), SimpleSAML_Error_Exception\logBacktrace(), sspmod_core_Auth_Source_AdminPassword\login(), metarefresh_hook_cron(), sspmod_core_Auth_Process_ExtendIdPSession\process(), sspmod_expirycheck_Auth_Process_ExpiryDate\process(), SimpleSAML\Utils\System\resolvePath(), SimpleSAML_Error_Error\saveError(), SimpleSAML\SessionHandlerStore\saveSession(), sspmod_saml_IdP_SAML1\sendResponse(), SimpleSAML_Session\setAuthorityExpire(), SimpleSAML_Session\setData(), SimpleSAML\Locale\Language\setLanguageCookie(), sspmod_multiauth_Auth_Source_MultiAuth\setPreviousSource(), SimpleSAML_Session\setRememberMeExpire(), SimpleSAML_Error_Error\show(), SimpleSAML_Metadata_Signer\sign(), sspmod_saml_Auth_Source_SP\startDisco(), and SimpleSAML_Session\updateSessionCookies().
SimpleSAML_Configuration::getInteger | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves an integer configuration option.
An exception will be thrown if this option isn't an integer, or if this option isn't found, and no default value is given.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not an integer. |
Definition at line 724 of file Configuration.php.
References $name, $ret, and getValue().
Referenced by SimpleSAML\Logger\SyslogLoggingHandler\__construct(), sspmod_saml_IdP_SAML2\buildAssertion(), sspmod_saml_Message\buildAuthnRequest(), sspmod_saml_IdP_SAML2\buildLogoutRequest(), getIntegerRange(), and sspmod_saml_Auth_Source_SP\startSSO2().
SimpleSAML_Configuration::getIntegerRange | ( | $name, | |
$minimum, | |||
$maximum, | |||
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves an integer configuration option where the value must be in the specified range.
An exception will be thrown if:
string | $name | The name of the option. |
int | $minimum | The smallest value which is allowed. |
int | $maximum | The largest value which is allowed. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not in the range specified. |
Definition at line 766 of file Configuration.php.
References $name, $ret, and getInteger().
SimpleSAML_Configuration::getLocalizedString | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
Retrieve a string which may be localized into many languages.
The default language returned is always 'en'.
string | $name | The name of the option. |
mixed | $default | The default value. If no default is given, and the option isn't found, an exception will be thrown. |
Exception | If the translation is not an array or a string, or its index or value are not strings. |
Definition at line 1255 of file Configuration.php.
References $name, $ret, array, and getValue().
Referenced by SimpleSAML_Metadata_SAMLBuilder\addAttributeConsumingService().
|
static |
Load a configuration file from a configuration set.
This function will return a configuration object even if the file does not exist.
string | $filename | The name of the configuration file. |
string | $configSet | The configuration set. Optional, defaults to 'simplesaml'. |
Exception | If the configuration set is not initialized. |
Definition at line 239 of file Configuration.php.
Referenced by sspmod_oauth_OAuthStore\__construct(), sspmod_core_ACL\getById(), SimpleSAML_Auth_Source\getSources(), SimpleSAML\Module\isModuleEnabled(), metarefresh_hook_cron(), oauth_hook_cron(), portal_hook_htmlinject(), and sanitycheck_hook_cron().
SimpleSAML_Configuration::getOptions | ( | ) |
Retrieve list of options.
This function returns the name of all options which are defined in this configuration file, as an array of strings.
Definition at line 1044 of file Configuration.php.
SimpleSAML_Configuration::getPathValue | ( | $name, | |
$default = null |
|||
) |
Retrieve a path configuration option set in config.php.
The function will always return an absolute path unless the option is not set. It will then return the default value.
It checks if the value starts with a slash, and prefixes it with the value from getBaseDir if it doesn't.
string | $name | Name of the configuration option. |
string | null | $default | Default value of the configuration option. This parameter will default to null if not specified. |
Definition at line 574 of file Configuration.php.
References $name, $path, and resolvePath().
Referenced by sspmod_core_Stats_Output_File\__construct(), and SimpleSAML\Logger\FileLoggingHandler\__construct().
SimpleSAML_Configuration::getPublicKeys | ( | $use = null , |
|
$required = false , |
|||
$prefix = '' |
|||
) |
Get public key from metadata.
string | null | $use | The purpose this key can be used for. (encryption or signing). |
bool | $required | Whether the public key is required. If this is true, a missing key will cause an exception. Default is false. |
string | $prefix | The prefix which should be used when reading from the metadata array. Defaults to ''. |
Exception | If the certificate or public key cannot be loaded from a file. |
SimpleSAML_Error_Exception | If the file does not contain a valid PEM-encoded certificate, or there is no certificate in the metadata. |
Definition at line 1303 of file Configuration.php.
References $data, $file, $key, $ret, array, getArray(), SimpleSAML\Utils\Config\getCertPath(), getString(), and hasValue().
Referenced by sspmod_saml_Message\checkSign(), sspmod_saml_IdP_SAML2\encryptAssertion(), SimpleSAML\Bindings\Shib13\Artifact\extractResponse(), sspmod_saml_Message\getEncryptionKey(), and SimpleSAML\Utils\Crypto\loadPublicKey().
SimpleSAML_Configuration::getString | ( | $name, | |
$default = self::REQUIRED_OPTION |
|||
) |
This function retrieves a string configuration option.
An exception will be thrown if this option isn't a string, or if this option isn't found, and no default value is given.
string | $name | The name of the option. |
mixed | $default | A default value which will be returned if the option isn't found. The option will be required if this parameter isn't given. The default value can be any value, including null. |
Exception | If the option is not a string. |
Definition at line 686 of file Configuration.php.
References $name, $ret, and getValue().
Referenced by SimpleSAML\Logger\StandardErrorLoggingHandler\__construct(), sspmod_core_Stats_Output_Log\__construct(), SimpleSAML\Logger\SyslogLoggingHandler\__construct(), SimpleSAML\Logger\ErrorLogLoggingHandler\__construct(), SimpleSAML\Logger\FileLoggingHandler\__construct(), SimpleSAML_Metadata_SAMLBuilder\addAttributeConsumingService(), sspmod_saml_Message\addSign(), sspmod_saml_IdP_SAML2\buildAssertion(), sspmod_saml_Message\buildAuthnRequest(), sspmod_saml_Message\buildLogoutRequest(), sspmod_saml_Message\buildLogoutResponse(), sspmod_saml_IdP_SAML2\buildResponse(), sspmod_statistics_AccessCheck\checkAccess(), sspmod_saml_Message\checkSign(), SimpleSAML_Stats\createOutput(), sspmod_saml_IdP_SAML2\encryptAssertion(), SAML2\Configuration\SimpleSAMLConverter\enrichForDecryptionProvider(), SAML2\Configuration\SimpleSAMLConverter\enrichForIdentityProvider(), SAML2\Configuration\SimpleSAMLConverter\enrichForServiceProvider(), SimpleSAML\Bindings\Shib13\Artifact\extractResponse(), SimpleSAML\XML\Shib13\AuthnResponse\generate(), sspmod_saml_IdP_SAML2\generateNameIdValue(), sspmod_saml_IdP_SAML2\getAttributeNameFormat(), getBaseDir(), getBasePath(), sspmod_saml_Message\getDecryptionKeys(), getDefaultBinding(), sspmod_saml_Message\getEncryptionKey(), getEndpoints(), getPublicKeys(), SimpleSAML\Utils\Crypto\loadPrivateKey(), SAML2\Configuration\SimpleSAMLConverter\pluckConfiguration(), sspmod_saml_Message\processAssertion(), SAML2\SOAPClient\send(), SimpleSAML\Bindings\Shib13\HTTPPost\sendResponse(), sspmod_saml_Auth_Source_SP\startSSO1(), and sspmod_saml_Auth_Source_SP\startSSO2().
SimpleSAML_Configuration::getValue | ( | $name, | |
$default = null |
|||
) |
Retrieve a configuration option set in config.php.
string | $name | Name of the configuration option. |
mixed | $default | Default value of the configuration option. This parameter will default to null if not specified. This can be set to SimpleSAML_Configuration::REQUIRED_OPTION, which will cause an exception to be thrown if the option isn't found. |
Exception | If the required option cannot be retrieved. |
Definition at line 405 of file Configuration.php.
Referenced by sspmod_saml_Message\buildAuthnRequest(), sspmod_statistics_AccessCheck\checkAccess(), getArray(), getArrayize(), getBoolean(), getConfigItem(), getConfigList(), getInteger(), getLocalizedString(), getString(), getValueValidate(), and SAML2\SOAPClient\send().
SimpleSAML_Configuration::getValueValidate | ( | $name, | |
$allowedValues, | |||
$default = self::REQUIRED_OPTION |
|||
) |
Retrieve a configuration option with one of the given values.
This will check that the configuration option matches one of the given values. The match will use strict comparison. An exception will be thrown if it does not match.
The option can be mandatory or optional. If no default value is given, it will be considered to be mandatory, and an exception will be thrown if it isn't provided. If a default value is given, it is considered to be optional, and the default value is returned. The default value is automatically included in the list of allowed values.
string | $name | The name of the option. |
array | $allowedValues | The values the option is allowed to take, as an array. |
mixed | $default | The default value which will be returned if the option isn't found. If this parameter isn't given, the option will be considered to be mandatory. The default value can be any value, including null. |
Exception | If the option does not have any of the allowed values. |
Definition at line 812 of file Configuration.php.
References $name, $ret, array, and getValue().
Referenced by sspmod_saml_Message\buildAuthnRequest().
SimpleSAML_Configuration::getVersion | ( | ) |
Retrieve the current version of SimpleSAMLphp.
Definition at line 387 of file Configuration.php.
SimpleSAML_Configuration::hasValue | ( | $name | ) |
Check whether a key in the configuration exists or not.
string | $name | The key in the configuration to look for. |
Definition at line 429 of file Configuration.php.
Referenced by SimpleSAML_Metadata_SAMLBuilder\addExtensions(), sspmod_saml_Message\buildAuthnRequest(), sspmod_saml_Message\checkSign(), SimpleSAML\XML\Shib13\AuthnResponse\generate(), getPublicKeys(), SimpleSAML\Utils\Crypto\loadPrivateKey(), SimpleSAML\Utils\Crypto\loadPublicKey(), SAML2\Configuration\SimpleSAMLConverter\pluckConfiguration(), SAML2\SOAPClient\send(), and SimpleSAML\Bindings\Shib13\HTTPPost\sendResponse().
SimpleSAML_Configuration::hasValueOneOf | ( | $names | ) |
Check whether any key of the set given exists in the configuration.
array | $names | An array of options to look for. |
Definition at line 442 of file Configuration.php.
|
static |
Initialize a instance name with the given configuration file.
TODO: remove.
string | $path | |
string | $instancename | |
string | $configfilename |
Definition at line 332 of file Configuration.php.
|
static |
Loads a configuration from the given array.
array | $config | The configuration array. |
string | $location | The location which will be given when an error occurs. Optional. |
string | null | $instance | The name of this instance. If specified, the configuration will be loaded and an instance with that name will be kept for it to be retrieved later with getInstance($instance). If null, the configuration will not be kept for later use. Defaults to null. |
Definition at line 269 of file Configuration.php.
Referenced by sspmod_authtwitter_Auth_Source_Twitter\__construct(), SimpleSAML_Metadata_MetaDataStorageHandlerSerialize\__construct(), sspmod_ldap_Auth_Source_LDAPMulti\__construct(), sspmod_core_Auth_Process_ScopeFromAttribute\__construct(), sspmod_negotiate_Auth_Source_Negotiate\__construct(), sspmod_saml_Auth_Source_SP\__construct(), SimpleSAML\Error\CriticalConfigurationError\__construct(), sspmod_core_Auth_Process_ScopeAttribute\__construct(), sspmod_authfacebook_Auth_Source_Facebook\__construct(), sspmod_radius_Auth_Source_Radius\__construct(), sspmod_ldap_Auth_Process_BaseFilter\__construct(), sspmod_ldap_ConfigHelper\__construct(), SimpleSAML_Metadata_SAMLBuilder\addSecurityTokenServiceType(), sspmod_saml_Message\buildAuthnRequest(), sspmod_saml_IdP_SAML2\getAssociationConfig(), SimpleSAML_Metadata_MetaDataStorageHandler\getMetaDataConfig(), SimpleSAML_Metadata_MetaDataStorageHandler\getMetaDataConfigForSha1(), sspmod_saml_IdP_SAML2\handleAuthError(), metarefresh_hook_cron(), sspmod_saml_IdP_SAML1\sendResponse(), sspmod_saml_IdP_SAML2\sendResponse(), and sspmod_adfs_IdP_ADFS\sendResponse().
|
staticprivate |
Load the given configuration file.
string | $filename | The full path of the configuration file. |
bool | $required | Whether the file is required. |
Exception | If the configuration file is invalid or missing. |
Definition at line 109 of file Configuration.php.
References $cfg, $config, $filename, array, and SimpleSAML\Logger\warning().
SimpleSAML_Configuration::resolvePath | ( | $path | ) |
This function resolves a path which may be relative to the SimpleSAMLphp base directory.
The path will never end with a '/'.
string | null | $path | The path we should resolve. This option may be null. |
Definition at line 536 of file Configuration.php.
References $path, and getBaseDir().
Referenced by getPathValue().
|
static |
Set the directory for configuration files for the given configuration set.
string | $path | The directory which contains the configuration files. |
string | $configSet | The configuration set. Defaults to 'simplesaml'. |
Definition at line 191 of file Configuration.php.
References $path.
Referenced by ilSimpleSAMLphpWrapper\__construct().
SimpleSAML_Configuration::toArray | ( | ) |
Convert this configuration object back to an array.
Definition at line 1055 of file Configuration.php.
References $configuration.
Referenced by getBasePath().
|
staticprivate |
Definition at line 37 of file Configuration.php.
|
private |
Definition at line 55 of file Configuration.php.
Referenced by toArray().
|
private |
Definition at line 79 of file Configuration.php.
|
private |
Definition at line 71 of file Configuration.php.
Referenced by loadFromFile().
|
staticprivate |
Definition at line 26 of file Configuration.php.
|
staticprivate |
Definition at line 47 of file Configuration.php.
|
private |
Definition at line 63 of file Configuration.php.
Referenced by __construct().
const SimpleSAML_Configuration::REQUIRED_OPTION = '___REQUIRED_OPTION___' |
Definition at line 18 of file Configuration.php.