Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Aacotroneo/Saml2/Saml2Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ function getMetadata()
{
$auth = $this->auth;
$settings = $auth->getSettings();
$metadata = $settings->getSPMetadata();

$validUntil = isset($settings->getSPData()['validUntil']) ? $settings->getSPData()['validUntil'] : null;
$cacheDuration = isset($settings->getSPData()['cacheDuration']) ? $settings->getSPData()['cacheDuration'] : null;

$metadata = $settings->getSPMetadata(false, $validUntil, $cacheDuration);
$errors = $settings->validateMetadata($metadata);

if (empty($errors)) {
Expand Down
12 changes: 12 additions & 0 deletions src/config/mytestidp1_idp_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@
// Leave blank to use the '{idpName}_sls' route, e.g. 'test_sls'
'url' => '',
),

/*
* Metadata's valid time (timestamp format)
* Set to null to use OneLogin's default value
*/
'validUntil' => null,

/*
* Duration of the cache in seconds
* Set to null to use OneLogin's default value
*/
'cacheDuration' => null,
),

// Identity Provider Data that we want connect with our SP
Expand Down