|
| getMetadataSet ($set) |
| This function retrieves the given set of metadata. More...
|
|
| getMetadataSet ($set) |
| This function attempts to generate an associative array with metadata for all entities in the given set. More...
|
|
| getEntityIdFromHostPath ($hostPath, $set, $type='entityid') |
| This function resolves an host/path combination to an entity id. More...
|
|
| getPreferredEntityIdFromCIDRhint ($set, $ip, $type='entityid') |
| This function will go through all the metadata, and check the DiscoHints->IPHint parameter, which defines a network space (ip range) for each remote entry. More...
|
|
| getMetaData ($index, $set) |
| This function retrieves metadata for the given entity id in the given set of metadata. More...
|
|
|
| __construct ($config) |
| This constructor initializes the flatfile metadata storage handler with the specified configuration. More...
|
|
|
static | parseSources ($sourcesConfig) |
| Parse array with metadata sources. More...
|
|
static | getSource ($sourceConfig) |
| This function creates a metadata source based on the given configuration. More...
|
|
◆ __construct()
SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile::__construct |
( |
|
$config | ) |
|
|
protected |
This constructor initializes the flatfile metadata storage handler with the specified configuration.
The configuration is an associative array with the following possible elements:
- 'directory': The directory we should load metadata from. The default directory is set in the 'metadatadir' configuration option in 'config.php'.
- Parameters
-
array | $config | An associative array with the configuration for this handler. |
Definition at line 41 of file MetaDataStorageHandlerFlatFile.php.
References $config, $globalConfig, and SimpleSAML_Configuration\getInstance().
49 if (array_key_exists(
'directory',
$config)) {
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
◆ generateDynamicHostedEntityID()
SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile::generateDynamicHostedEntityID |
( |
|
$set | ) |
|
|
private |
Definition at line 127 of file MetaDataStorageHandlerFlatFile.php.
References SimpleSAML\Utils\HTTP\getBaseURL().
Referenced by getMetadataSet().
132 if ($set ===
'saml20-idp-hosted') {
133 return $baseurl.
'saml2/idp/metadata.php';
134 } elseif ($set ===
'shib13-idp-hosted') {
135 return $baseurl.
'shib13/idp/metadata.php';
136 } elseif ($set ===
'wsfed-sp-hosted') {
137 return 'urn:federation:'.\SimpleSAML\Utils\HTTP::getSelfHost();
138 } elseif ($set ===
'adfs-idp-hosted') {
139 return 'urn:federation:'.\SimpleSAML\Utils\HTTP::getSelfHost().
':idp';
141 throw new Exception(
'Can not generate dynamic EntityID for metadata of this type: ['.$set.
']');
static getBaseURL()
Retrieve the base URL of the SimpleSAMLphp installation.
◆ getMetadataSet()
SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile::getMetadataSet |
( |
|
$set | ) |
|
This function retrieves the given set of metadata.
It will return an empty array if it is unable to locate it.
- Parameters
-
string | $set | The set of metadata we are retrieving. |
- Returns
- array An associative array with the metadata. Each element in the array is an entity, and the key is the entity id.
Definition at line 101 of file MetaDataStorageHandlerFlatFile.php.
References $entityId, generateDynamicHostedEntityID(), and load().
103 if (array_key_exists($set, $this->cachedMetadata)) {
104 return $this->cachedMetadata[$set];
107 $metadataSet = $this->
load($set);
108 if ($metadataSet === null) {
109 $metadataSet = array();
113 foreach ($metadataSet as
$entityId => &$entry) {
114 if (preg_match(
'/__DYNAMIC(:[0-9]+)?__/',
$entityId)) {
121 $this->cachedMetadata[$set] = $metadataSet;
◆ load()
SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile::load |
( |
|
$set | ) |
|
|
private |
This function loads the given set of metadata from a file our metadata directory.
This function returns null if it is unable to locate the given set in the metadata directory.
- Parameters
-
string | $set | The set of metadata we are loading. |
- Returns
- array An associative array with the metadata, or null if we are unable to load metadata from the given file.
- Exceptions
-
Exception | If the metadata set cannot be loaded. |
Definition at line 72 of file MetaDataStorageHandlerFlatFile.php.
References $metadata.
Referenced by getMetadataSet().
74 $metadatasetfile = $this->
directory.$set.
'.php';
76 if (!file_exists($metadatasetfile)) {
82 include($metadatasetfile);
85 throw new Exception(
'Could not load metadata set ['.$set.
'] from file: '.$metadatasetfile);
$metadata['__DYNAMIC:1__']
◆ $cachedMetadata
SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile::$cachedMetadata = array() |
|
private |
◆ $directory
SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile::$directory |
|
private |
The documentation for this class was generated from the following file: