1. Go to this page and download the library: Download moko-github/kerberos-auth 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/ */
// config/kerberos.php
'excluded_routes' => [
'admin.*', // toutes les routes d'admin
'api.*', // toutes les routes API
'webhook.pay', // une route spécifique
],
env
KERBEROS_ENABLED=false # Active l'authentification Kerberos
KERBEROS_SERVER_VAR=REMOTE_USER # Variable serveur contenant le principal
KERBEROS_FALLBACK_AUTH=true # true = login classique en secours ; false = Kerberos strict (403 sans ticket)
KERBEROS_SIMULATION_MODE=false # Active le mode simulation (dév uniquement)
KERBEROS_ADMIN_ROLE=Admin # Nom du rôle admin (destinataires des notifications)
KERBEROS_ADMIN_EMAILS= # Emails admins (virgule). Si renseigné, notifie ces adresses ; sinon les users du rôle admin
KERBEROS_ADMIN_NOTIFICATION_MODE=immediate # 'immediate' ou 'disabled'
KERBEROS_AUTO_CLEANUP_DAYS=30 # Rétention des tentatives en jours
KERBEROS_ALLOWED_DOMAINS= # (non implémenté — réservé multi-realm)