PHP code example of friezer-85 / cas-oauth-laravel
1. Go to this page and download the library: Download friezer-85/cas-oauth-laravel 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/ */
friezer-85 / cas-oauth-laravel example snippets
return [
/*
|--------------------------------------------------------------------------
| CAS Services Configuration
|--------------------------------------------------------------------------
|
| Liste des URLs autorisées à utiliser le serveur CAS.
| Utilisez des regex pour matcher les URLs.
| IMPORTANT : Échappez les points avec \.
|
*/
'cas' => [
// Exemple : autoriser tout sur un domaine
'https://app1\.example\.com/(.*)',
// Exemple : autoriser plusieurs domaines
'https://moodle\.example\.com/(.*)',
'https://app2\.example\.com/(.*)',
// Pour le développement local
'http://localhost/(.*)',
'http://127\.0\.0\.1:8000/(.*)',
],
];
'cas' => [
'https://app\.example\.com/(.*)',
]
bash
php artisan migrate
GET /cas/login?service={RETURN_URL}
GET /cas/serviceValidate?service={URL}&ticket={TICKET}