Skip to content
Snippets Groups Projects
valid-accounts.php.tt2 716 B
Newer Older
<?php
// template for a PhP configuration file loaded in simpleSamlPhp authsources.php file
$validTestAccounts = array (
    'authcrypt:Hash',

[% FOREACH account IN accounts %]
  [% PROCESS "accountProfiles/${account.account_profile()}.tt2" %]
Guillaume ROUSSE's avatar
Guillaume ROUSSE committed
  'user[% account.id() %]:{SHA256}[% account.user_password_hash() %]=' => array(
  [% FOREACH attribute IN account_profile.pairs -%]
renater.salaun's avatar
renater.salaun committed
   [% NEXT IF attribute.key.match('^(type|comment)$') %]
   [% IF attribute.value.isa('SCALAR') -%]
	'[% attribute.key %]' => '[% attribute.value %]',
   [% ELSE -%]
	'[% attribute.key %]' => array('[% attribute.value.join("','") %]'),
   [% END %]
  [% END %]
Guillaume ROUSSE's avatar
Guillaume ROUSSE committed
        'associatedSP' => "[% account.sp_entityid() %]",
[% END %]
);