PHP code example of safire-ac-za / simplesamlphp-module-sqlattribs
1. Go to this page and download the library: Download safire-ac-za/simplesamlphp-module-sqlattribs 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/ */
safire-ac-za / simplesamlphp-module-sqlattribs example snippets
50 => [
'class' => 'sqlattribs:AttributeFromSQL',
'identifyingAttribute' => 'eduPersonPrincipalName',
'limit' => ['eduPersonEntitlement', 'eduPersonAffiliation'],
'replace' => false,
'database' => [
'dsn' => 'mysql:host=localhost;dbname=simplesamlphp',
'username' => 'yourDbUsername',
'password' => 'yourDbPassword',
'table' => 'AttributeFromSQL',
],
],
$attributes = [
'eduPersonPrincipalName' => '[email protected]',
'eduPersonAffiliation' => ['member'],
'displayName' => 'Example User',
],
$attributes = [
'eduPersonPrincipalName' => '[email protected]',
'displayName' => 'Example User',
'eduPersonEntitlement' => [
'urn:mace:exampleIdP.org:demoservice:demo-admin',
'urn:mace:grnet.gr:eduroam:admin',
],
'eduPersonAffiliation' => [
'member',
'faculty',
],
],