Skip to content
Snippets Groups Projects
Unverified Commit 470c69ac authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Migrate all calls of SimpleSAML_Auth_Simple to \SimpleSAML\Auth\Simple.

Fix build as a side effect. When vimeo/psalm tries to resolve dependencies, it now fails with this.
parent 918a1fb4
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ class SimpleSAML_IdP
/**
* Our authsource.
*
* @var SimpleSAML_Auth_Simple
* @var \SimpleSAML\Auth\Simple
*/
private $authSource;
......@@ -103,7 +103,7 @@ class SimpleSAML_IdP
$auth = $this->config->getString('auth');
if (SimpleSAML_Auth_Source::getById($auth) !== null) {
$this->authSource = new SimpleSAML_Auth_Simple($auth);
$this->authSource = new \SimpleSAML\Auth\Simple($auth);
} else {
throw new SimpleSAML_Error_Exception('No such "'.$auth.'" auth source found.');
}
......
......@@ -65,7 +65,7 @@ class Auth
// not authenticated as admin user, start authentication
if (\SimpleSAML_Auth_Source::getById('admin') !== null) {
$as = new \SimpleSAML_Auth_Simple('admin');
$as = new \SimpleSAML\Auth\Simple('admin');
$as->login();
} else {
throw new \SimpleSAML_Error_Exception(
......
......@@ -28,7 +28,7 @@ $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.');
$as = new SimpleSAML_Auth_Simple($auth);
$as = new \SimpleSAML\Auth\Simple($auth);
if (!$as->isAuthenticated()) {
$params = array(
'ForceAuthn' => $forceAuthn,
......
......@@ -70,7 +70,7 @@ $config = SimpleSAML_Configuration::getInstance();
$cA_config = SimpleSAML_Configuration::getConfig('module_consentAdmin.php');
$authority = $cA_config->getValue('authority');
$as = new SimpleSAML_Auth_Simple($authority);
$as = new \SimpleSAML\Auth\Simple($authority);
// If request is a logout request
if (array_key_exists('logout', $_REQUEST)) {
......
......@@ -29,7 +29,7 @@ if (!empty($_REQUEST['saml:idp'])) {
$options['saml:idp'] = $_REQUEST['saml:idp'];
}
$as = new SimpleSAML_Auth_Simple($_REQUEST['AuthId']);
$as = new \SimpleSAML\Auth\Simple($_REQUEST['AuthId']);
$as->requireAuth($options);
\SimpleSAML\Utils\HTTP::redirectTrustedURL($options['ReturnTo']);
......@@ -14,5 +14,5 @@ if (!isset($_REQUEST['AuthId']) || !is_string($_REQUEST['AuthId'])) {
throw new SimpleSAML_Error_BadRequest('Missing AuthId parameter.');
}
$as = new SimpleSAML_Auth_Simple($_REQUEST['AuthId']);
$as = new \SimpleSAML\Auth\Simple($_REQUEST['AuthId']);
$as->logout(\SimpleSAML\Utils\HTTP::checkURLAllowed($_REQUEST['ReturnTo']));
......@@ -11,7 +11,7 @@ if (!array_key_exists('as', $_REQUEST)) {
}
$asId = (string) $_REQUEST['as'];
$as = new SimpleSAML_Auth_Simple($asId);
$as = new \SimpleSAML\Auth\Simple($asId);
if (array_key_exists('logout', $_REQUEST)) {
$as->logout($config->getBasePath().'logout.php');
......
......@@ -41,7 +41,7 @@ class sspmod_statistics_AccessCheck
// We are using an authsource for login.
$as = new SimpleSAML_Auth_Simple($authsource);
$as = new \SimpleSAML\Auth\Simple($authsource);
$as->requireAuth();
// User logged in with auth source.
......
......@@ -27,7 +27,7 @@ try {
$amc = SimpleSAML_AuthMemCookie::getInstance();
$sourceId = $amc->getAuthSource();
$s = new SimpleSAML_Auth_Simple($sourceId);
$s = new \SimpleSAML\Auth\Simple($sourceId);
// check if the user is authorized. We attempt to authenticate the user if not
$s->requireAuth();
......
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