Created
September 17, 2015 14:38
-
-
Save zopieux/8153de8bed1a765c6f42 to your computer and use it in GitHub Desktop.
eirb CAS Eirbware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'eirb-common/CAS/CAS.php'; | |
function eirb_cas_protect() { | |
phpCAS::client(CAS_VERSION_2_0, 'cas.enseirb-matmeca.fr', 443, 'cas'); | |
phpCAS::setNoCasServerValidation(); | |
phpCAS::forceAuthentication(); | |
return phpCAS::getUser(); | |
} | |
function eirb_cas_logout() { | |
phpCAS::client(CAS_VERSION_2_0, 'cas.enseirb-matmeca.fr', 443, 'cas'); | |
phpCAS::setNoCasServerValidation(); | |
phpCAS::logout(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment