PHP code example of sindll / yii2-cas

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

    

sindll / yii2-cas example snippets


return [
    //....
    'bootstrap' => [
        //...
        'cas',
    ],
    'modules' => [
        //...
        'cas' => [
            'class' => 'sindll\cas\Module',
        ],
    ],
    'components' => [
        //...
        'user' => [
            //...
            'loginUrl' => ['cas/passport/login'],
        ],
    ]
];

return [
    //...
    'cas' => [
        'host' => '',
        'port' => '',
        'path' => '',
        'log'  => '',
        'handle_logout_request' => [
            'check_client'    => false, // default
            'allowed_clients' => [], // default
        ],
    ]
];