Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 1afd8c4

Browse files
committed
Fixes
* Updated template configuration * Fixes after rebase
1 parent 15ae628 commit 1afd8c4

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

config-templates/module_statisticsproxy.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@
4646
'database.dsn' => 'mysql:host=localhost;port=3306;dbname=STATS;charset=utf8',
4747
'database.username' => 'stats',
4848
'database.password' => 'stats',
49+
50+
/**
51+
* Configuration for SSL
52+
* If you want to use SSL you must filled this value and uncomment block of code
53+
*/
54+
/*
55+
'database.driver_options' => [
56+
// Path for the ssl key file
57+
PDO::MYSQL_ATTR_SSL_KEY => '',
58+
// Path for the ssl cert file
59+
PDO::MYSQL_ATTR_SSL_CERT => '',
60+
// Path for the ssl ca file
61+
PDO::MYSQL_ATTR_SSL_CA => '',
62+
// Path for the ssl ca dir
63+
PDO::MYSQL_ATTR_SSL_CAPATH => '',
64+
],
65+
*/
4966
],
5067

5168
/*

lib/Auth/Process/DatabaseCommand.php

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,12 @@ public function insertLogin(&$request, &$date)
4141
$spName = isset($request['Destination']['name']) ? $request['Destination']['name']['en'] : '';
4242
}
4343

44-
if (!in_array($databaseConnector->getMode(), ['PROXY', 'IDP', 'SP'])) {
45-
throw new Exception('Unknown mode is set. Mode has to be one of the following: PROXY, IDP, SP.');
46-
}
47-
48-
if ($databaseConnector->getMode() !== 'IDP') {
49-
$idpName = $request['Attributes']['sourceIdPName'][0];
50-
$idpEntityID = $request['saml:sp:IdP'];
51-
}
52-
if ($databaseConnector->getMode() !== 'SP') {
53-
$spEntityId = $request['Destination']['entityid'];
54-
$spName = isset($request['Destination']['name']) ? $request['Destination']['name']['en'] : '';
55-
}
56-
57-
if ($databaseConnector->getMode() === 'IDP') {
58-
$idpName = $databaseConnector->getIdpName();
59-
$idpEntityID = $databaseConnector->getIdpEntityId();
60-
} elseif ($databaseConnector->getMode() === 'SP') {
61-
$spEntityId = $databaseConnector->getSpEntityId();
62-
$spName = $databaseConnector->getSpName();
44+
if ($this->databaseConnector->getMode() === 'IDP') {
45+
$idpName = $$this->databaseConnector->getIdpName();
46+
$idpEntityID = $$this->databaseConnector->getIdpEntityId();
47+
} elseif ($this->databaseConnector->getMode() === 'SP') {
48+
$spEntityId = $$this->databaseConnector->getSpEntityId();
49+
$spName = $$this->databaseConnector->getSpName();
6350
}
6451

6552
$year = $date->format('Y');
@@ -97,7 +84,6 @@ public function insertLogin(&$request, &$date)
9784
}
9885
}
9986

100-
$conn->close();
10187
}
10288

10389
public function getSpNameBySpIdentifier($identifier)

0 commit comments

Comments
 (0)