Skip to content
Snippets Groups Projects
Commit ff6eff84 authored by Andy Brüchert's avatar Andy Brüchert
Browse files

Merge branch 'release/0.3.0'

parents 399d7e09 80639bf2
No related branches found
No related tags found
No related merge requests found
...@@ -9,5 +9,10 @@ ...@@ -9,5 +9,10 @@
}, },
"require-dev": { "require-dev": {
"simplesamlphp/simplesamlphp": "~1.13" "simplesamlphp/simplesamlphp": "~1.13"
},
"autoload": {
"psr-4": {
"SimpleSAML\\Module\\pica\\": "lib/"
}
} }
} }
<?php <?php
namespace SimpleSAML\Module\pica\Auth\Source;
/** /**
* This file is part of SimpleSAMLphp Module Pica. * This file is part of SimpleSAMLphp Module Pica.
* *
...@@ -17,20 +19,24 @@ ...@@ -17,20 +19,24 @@
* along with SimpleSAMLphp Module Pica. If not, see <http://www.gnu.org/licenses/>. * along with SimpleSAMLphp Module Pica. If not, see <http://www.gnu.org/licenses/>.
* *
* @author David Maus <maus@hab.de> * @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 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3 or higher
*/ */
use HAB\Pica\Auth; use HAB\Pica\Auth;
use SimpleSAML\Configuration;
/** /**
* Authentication source for Pica-based library systems. * Authentication source for Pica-based library systems.
* *
* @author David Maus <maus@hab.de> * @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 * @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. * Error message settings.
...@@ -56,7 +62,7 @@ class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase ...@@ -56,7 +62,7 @@ class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase
throw new Exception('Pica authentication source configuration missing: [pica]'); 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->factory = $this->createAuthenticationModuleFactory($configuration);
$this->message = $configuration->getArray('errors', array()); $this->message = $configuration->getArray('errors', array());
$this->attrmap = $configuration->getArray('attrmap', array()); $this->attrmap = $configuration->getArray('attrmap', array());
...@@ -83,10 +89,10 @@ class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase ...@@ -83,10 +89,10 @@ class sspmod_pica_Auth_Source_Pica extends sspmod_core_Auth_UserPassBase
/** /**
* Return authentication module factory function. * Return authentication module factory function.
* *
* @param SimpleSAML_Configuration $config * @param Configuration $config
* @return callable * @return callable
*/ */
public function createAuthenticationModuleFactory (SimpleSAML_Configuration $config) public function createAuthenticationModuleFactory (Configuration $config)
{ {
$module = $config->getString('module'); $module = $config->getString('module');
switch ($module) { switch ($module) {
......
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