PHP code example of niif / simplesamlphp-module-attributecollector
1. Go to this page and download the library: Download niif/simplesamlphp-module-attributecollector library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
niif / simplesamlphp-module-attributecollector example snippets
$metadata = array(
'ssp-idp' => array(
...
'authproc' => array(
10 => array(
'existing' => 'preserve',
'class' => 'attributecollector:AttributeCollector',
'uidfield' => 'subject',
'collector' => array(
'class' => 'attributecollector:SQLCollector',
'dsn' => 'pgsql:host=localhost;dbname=ssp-extra',
'username' => 'ssp-extra',
'password' => 'ssp-extra',
'query' => 'SELECT * from extra where subject=:uidfield',
)
)
),
...
)
);