class cas
The snippet can be accessed without any authentication.
Authored by
Aline
myClassCas.php 494 B
class Cas
{
public function __construct($casServer, $casPort, $casPath) {
\phpCAS::client(CAS_VERSION_2_0, $casServer, $casPort, $casPath, false);
\phpCAS::setCasServerCACert('/etc/ssl/certs/UTN_USERFirst_Hardware_Root_CA.pem');
return;
}
public function login() {
\phpCAS::forceAuthentication();
return \phpCAS::getUser();
}
public function logout($url) {
\phpCAS::logout(['service' => $url]);
return;
}
}
Please register or sign in to comment