Skip to content
Snippets Groups Projects
Commit a07b0cdf authored by Olav Morken's avatar Olav Morken
Browse files

casserver: Change to use SimpleSAML_Auth_Simple.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2604 44740490-163a-0410-bde0-09ae8108e29a
parent f6819645
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,6 @@ $isPassive = isset($_GET['gateway']) && $_GET['gateway'];
$config = SimpleSAML_Configuration::getInstance();
$casconfig = SimpleSAML_Configuration::getConfig('module_casserver.php');
$session = SimpleSAML_Session::getInstance();
$legal_service_urls = $casconfig->getValue('legal_service_urls');
if (!checkServiceURL($service, $legal_service_urls))
......@@ -29,18 +28,16 @@ $auth = $casconfig->getValue('auth', 'saml2');
if (!in_array($auth, array('saml2', 'shib13')))
throw new Exception('CAS Service configured to use [auth] = ' . $auth . ' only [saml2,shib13] is legal.');
if (!$session->isValid($auth)) {
$url = SimpleSAML_Utilities::selfURL();
$hints = array(
SimpleSAML_Auth_State::RESTART => $url,
'ForceAuthn' => $forceAuthn,
'isPassive' => $isPassive,
$as = new SimpleSAML_Auth_Simple($auth);
if (!$as->isAuthenticated()) {
$params = array(
'ForceAuthn' => $forceAuthn,
'isPassive' => $isPassive,
);
SimpleSAML_Auth_Default::initLogin($auth, $url, $url, $hints);
$as->login($params);
}
$attributes = $session->getAttributes();
$attributes = $as->getAttributes();
$path = $casconfig->resolvePath($casconfig->getValue('ticketcache', '/tmp'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment