PHP code example of attek / ptesaml

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

    

attek / ptesaml example snippets


'components' => [
    'saml' => [
            'class' => 'attek\ptesaml\Saml',
            'simpleSamlPath' => '/usr/share/simplesamlphp/',
            'config' => 'default-sp'
    ]
]

$saml = Yii::$app->saml;
//check is authenticated
$saml->isAuthenticated();
//Login
$saml->


use attek\ptesaml\SamlAsset;

/* @var yii\web\View $this */
SamlAsset::register($this);