Skip to content
Snippets Groups Projects
Commit 0d0ef013 authored by René Češka's avatar René Češka
Browse files

Updated SimpleSamlPHP to work without composer

- added configiguration that allows user to configure path to
SimpleSamlPHP library
parent f92d24a5
No related branches found
No related tags found
No related merge requests found
...@@ -328,6 +328,7 @@ $STUDIP_AUTH_CONFIG_OAUTH2 = [ ...@@ -328,6 +328,7 @@ $STUDIP_AUTH_CONFIG_OAUTH2 = [
$STUDIP_AUTH_CONFIG_SIMPLESAMLPHP = [ $STUDIP_AUTH_CONFIG_SIMPLESAMLPHP = [
'sp_name' => 'default-sp', 'sp_name' => 'default-sp',
'path_to_simple_saml_php' => '/var/simplesamlphp/src/_autoload.php' // path to _autoload.php of SimpleSamlPHP library
'user_data_mapping' => [ 'user_data_mapping' => [
'auth_user_md5.Email' => ['callback' => 'getUserData', 'map_args' => 'email'], 'auth_user_md5.Email' => ['callback' => 'getUserData', 'map_args' => 'email'],
'auth_user_md5.Nachname' => ['callback' => 'getUserData', 'map_args' => 'firstName'], 'auth_user_md5.Nachname' => ['callback' => 'getUserData', 'map_args' => 'firstName'],
......
...@@ -16,6 +16,8 @@ class StudipAuthSimpleSamlPHP extends StudipAuthSSO ...@@ -16,6 +16,8 @@ class StudipAuthSimpleSamlPHP extends StudipAuthSSO
// Name of attribute that contains username (if empty it will use NameID as username) // Name of attribute that contains username (if empty it will use NameID as username)
public ?string $username_attribute = null; public ?string $username_attribute = null;
public ?string $path_to_simple_saml_php = null;
public ?array $userdata = null; public ?array $userdata = null;
public SimpleSAML\Auth\Simple $as; public SimpleSAML\Auth\Simple $as;
...@@ -26,6 +28,12 @@ class StudipAuthSimpleSamlPHP extends StudipAuthSSO ...@@ -26,6 +28,12 @@ class StudipAuthSimpleSamlPHP extends StudipAuthSSO
{ {
parent::__construct($config); parent::__construct($config);
if(!isset($this->path_to_simple_saml_php)){
require_once('/var/simplesamlphp/src/_autoload.php');
}else{
require_once($this->path_to_simple_saml_php );
}
if (!isset($this->plugin_fullname)) { if (!isset($this->plugin_fullname)) {
$this->plugin_fullname = _('SAML'); $this->plugin_fullname = _('SAML');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment