PHP code example of simplesamlphp / simplesamlphp-module-entitycategories

1. Go to this page and download the library: Download simplesamlphp/simplesamlphp-module-entitycategories 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/ */

    

simplesamlphp / simplesamlphp-module-entitycategories example snippets


    'module.enable' => [ 'authcrypt' => true, … ],

    50 => [
        'class' => 'entitycategories:EntityCategory',
        'default' => true,
        'urn:something:local_service' => [
            'eduPersonPrincipalName',
        ],
    ],

    'EntityAttributes' => [
        'http://macedir.org/entity-category' => [
            'urn:something:local_service'
        ],
    ],

    51 => [
        'class' => 'core:AttributeLimit',
        'default' => true,
    ],

    50 => [
        'class' => 'entitycategories:EntityCategory',
        'urn:something:local_service' => [
            'eduPersonPrincipalName',
        ],
    ],

    50  => [
         'class' => 'entitycategories:EntityCategory',
         'default' => true,
         'strict' => false,
         'allowRequestedAttributes' => true,
         'http://refeds.org/category/research-and-scholarship' => [
             'urn:oid:2.16.840.1.113730.3.1.241', #displayName
             'urn:oid:2.5.4.4', #sn
             'urn:oid:2.5.4.42', #givenName
             'urn:oid:0.9.2342.19200300.100.1.3', #mail
             'urn:oid:1.3.6.1.4.1.5923.1.1.1.6', #eduPersonPrincipalName
             'urn:oid:1.3.6.1.4.1.5923.1.1.1.9', #eduPersonScopedAffiliation
         ],
    ],

    50  => [
         'class' => 'entitycategories:EntityCategory',
         'default' => true,
         'strict' => true,
         'allowRequestedAttributes' => true,
         'urn:x-myfederation:entities' => [],
         'http://www.geant.net/uri/dataprotection-code-of-conduct/v1' => [],
         'http://refeds.org/category/research-and-scholarship' => [
             'urn:oid:2.16.840.1.113730.3.1.241', #displayName
             'urn:oid:2.5.4.4', #sn
             'urn:oid:2.5.4.42', #givenName
             'urn:oid:0.9.2342.19200300.100.1.3', #mail
             'urn:oid:1.3.6.1.4.1.5923.1.1.1.6', #eduPersonPrincipalName
             'urn:oid:1.3.6.1.4.1.5923.1.1.1.9', #eduPersonScopedAffiliation
         ],
    ],

    51 => [
        'class' => 'niif:AttributeLimit',
        'default' => true,
        'bilateralSPs' => [
            'google.com' => ['mail'],
            'urn:federation:MicrosoftOnline' => ['IDPEmail', 'ImmutableID'],
         ],
    ],