Commit 80639bf2 authored by Andy Brüchert's avatar Andy Brüchert
Browse files

Merge branch 'feature/use-namespaces' into develop

parents 399d7e09 c8300a9b
......@@ -9,5 +9,10 @@
},
"require-dev": {
"simplesamlphp/simplesamlphp": "~1.13"
},
"autoload": {
"psr-4": {
"SimpleSAML\\Module\\pica\\": "lib/"
}
}
}
<?php
namespace SimpleSAML\Module\pica\Auth\Source;
/**
* This file is part of SimpleSAMLphp Module Pica.
*
......@@ -17,20 +19,24 @@
* along with SimpleSAMLphp Module Pica. If not, see <http://www.gnu.org/licenses/>.
*
* @author David Maus <maus@hab.de>
* @copyright (c) 2015 by Herzog August Bibliothek Wolfenbüttel
* @author Andy Brüchert <bruechert@hab.de>
* @copyright (c) 2015-2021 by Herzog August Bibliothek Wolfenbüttel
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3 or higher
*/
use HAB\Pica\Auth;
use SimpleSAML\Configuration;
/**
* Authentication source for Pica-based library systems.
*
* @author David Maus <maus@hab.de>
* @copyright (c) 2015 by Herzog August Bibliothek Wolfenbüttel
* @author Andy Brüchert <bruechert@hab.de>
* @copyright (c) 2015-2021 by Herzog August Bibliothek Wolfenbüttel
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3 or higher
*/
class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase
class Pica extends \SimpleSAML\Module\core\Auth\UserPassBase
{
/**
* Error message settings.
......@@ -56,7 +62,7 @@ class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase
throw new Exception('Pica authentication source configuration missing: [pica]');
}
$configuration = SimpleSAML_Configuration::loadFromArray($config['pica']);
$configuration = Configuration::loadFromArray($config['pica']);
$this->factory = $this->createAuthenticationModuleFactory($configuration);
$this->message = $configuration->getArray('errors', array());
$this->attrmap = $configuration->getArray('attrmap', array());
......@@ -83,10 +89,10 @@ class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase
/**
* Return authentication module factory function.
*
* @param SimpleSAML_Configuration $config
* @param Configuration $config
* @return callable
*/
public function createAuthenticationModuleFactory (SimpleSAML_Configuration $config)
public function createAuthenticationModuleFactory (Configuration $config)
{
$module = $config->getString('module');
switch ($module) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment