1. Go to this page and download the library: Download efumanti/cohesion2-library 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/ */
efumanti / cohesion2-library example snippets
$cohesion = new Cohesion2;
$cohesion->useSSO(false);
$cohesion->auth();
$cohesion = new Cohesion2('cohesion2', null, null, 'PORTALE_AZIENDA');
$cohesion = new Cohesion2('cohesion2', ['app.example.it', 'www.example.it']);
$cohesion->auth();
// La libreria legge automaticamente $_ENV / $_SERVER / getenv() in questo
// ordine. È compatibile con vlucas/phpdotenv, Symfony Dotenv e Laravel.
$cohesion = new Cohesion2();
$cohesion->auth();
$cohesion = new Cohesion2('cohesion2', null, true);
$cohesion = new Cohesion2;
$cohesion->useSAML20(true);
$cohesion->enableEIDASLogin(); //per abilitare il login eIDAS
$cohesion->enableSPIDProLogin(['PF','PG','LP']); //per abilitare il login SPID Professionale
$cohesion->auth();