Skip to content

Instantly share code, notes, and snippets.

@borgand
Last active November 25, 2015 16:05
Show Gist options
  • Save borgand/e5be3c3b7ff90d9ed3d2 to your computer and use it in GitHub Desktop.
Save borgand/e5be3c3b7ff90d9ed3d2 to your computer and use it in GitHub Desktop.
TAAT eduGAIN metadata automaatne laadimine koos authproc lisamisega. Peamine juhend: https://simplesamlphp.org/docs/stable/simplesamlphp-automated_metadata
<?php
$config = array(
'sets' => array(
'edugain' => array(
'cron' => array('hourly'),
'sources' => array(
array(
'src' => 'https://taeva.taat.edu.ee/metadata/metadata.edugain+sp.xml',
'validateFingerprint' => 'C5:F4:79:B5:80:8D:90:C2:5A:7D:B0:8D:B4:99:D7:2D:06:7F:DE:E5',
'template' => array(
'tags' => array('edugain'),
'authproc' => array(
51 => array('class' => 'core:AttributeMap', 'name2oid'),
52 => array('class' => 'core:AttributeLimit'),
),
),
),
),
'expireAfter' => 60*60*24*4, // Maximum 4 days cache time.
'outputDir' => 'metadata/edugain/',
/*
* Which output format the metadata should be saved as.
* Can be 'flatfile' or 'serialize'. 'flatfile' is the default.
*/
'outputFormat' => 'flatfile',
),
),
);
# ... rest of the file
#
# Find 'metadata.sources' section and make it to reflect:
'metadata.sources' => array(
array('type' => 'flatfile', 'directory' => 'metadata'),
array('type' => 'flatfile', 'directory' => 'metadata/edugain'),
),
# ... rest of the file
<?php
/*
* Configuration for the Cron module.
*
* $Id: $
*/
$config = array (
'key' => 'GENERATE_SOME_RANDOM_STRING_HERE',
'allowed_tags' => array('daily', 'hourly', 'frequent'),
'debug_message' => false,
'sendemail' => false,
);
?>
# Run SimpleSAMLphp Hourly tasks at every second minute of an hour
2 * * * * apache curl --silent "https://SERVER/simplesaml/module.php/cron/cron.php?key=RANDOM_STRING&tag=hourly" > /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment