Skip to content

Instantly share code, notes, and snippets.

@zopieux
Created September 17, 2015 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zopieux/8153de8bed1a765c6f42 to your computer and use it in GitHub Desktop.
Save zopieux/8153de8bed1a765c6f42 to your computer and use it in GitHub Desktop.
eirb CAS Eirbware
<?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