PHP code example of snelg / cakephp-3-cas

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

    

snelg / cakephp-3-cas example snippets


$this->loadComponent('Auth');

$this->Auth->config('authenticate', [
    'CasAuth.Cas' => [
        'hostname' => 'cas.mydomain.com',
        'uri' => 'authpath']]);

$this->loadComponent('Auth', [
    'authenticate' => [
        'CasAuth.Cas' => [
            'hostname' => 'cas.mydomain.com',
            'uri' => 'authpath']]]);


Configure::write('CAS.hostname', 'cas.myhost.com');
Configure::write('CAS.port', 8443);

    'curlopts' => [CURLOPT_PROXY => 'http://proxy:5543', CURLOPT_CRLF => true]