From dcce9b9035d461313d347387ba0e79a76f058aff Mon Sep 17 00:00:00 2001 From: lukasmatusiewicz <77617779+lukasmatusiewicz@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:49:48 +0100 Subject: [PATCH 1/2] Update PrivacyideaAuthSource.php --- .../lib/Auth/Source/PrivacyideaAuthSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simplesamlphp-module-privacyidea/lib/Auth/Source/PrivacyideaAuthSource.php b/simplesamlphp-module-privacyidea/lib/Auth/Source/PrivacyideaAuthSource.php index 3ee9cb1..305a04c 100644 --- a/simplesamlphp-module-privacyidea/lib/Auth/Source/PrivacyideaAuthSource.php +++ b/simplesamlphp-module-privacyidea/lib/Auth/Source/PrivacyideaAuthSource.php @@ -148,7 +148,7 @@ public function authenticate(&$state) * @param string $username The username the user wrote. * @param string $password The password the user wrote. */ - protected function login(string $username, string $password) + protected function login($username, $password) { // Stub. SimpleSAML_Logger::debug("privacyIDEA AuthSource login stub"); From f149ea16677f0470eb280812725a64aab5e8e549 Mon Sep 17 00:00:00 2001 From: lukasmatusiewicz <77617779+lukasmatusiewicz@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:49:51 +0100 Subject: [PATCH 2/2] Update Utils.php --- simplesamlphp-module-privacyidea/lib/Auth/Utils.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simplesamlphp-module-privacyidea/lib/Auth/Utils.php b/simplesamlphp-module-privacyidea/lib/Auth/Utils.php index 2655266..60c6041 100644 --- a/simplesamlphp-module-privacyidea/lib/Auth/Utils.php +++ b/simplesamlphp-module-privacyidea/lib/Auth/Utils.php @@ -13,7 +13,7 @@ class sspmod_privacyidea_Auth_Utils * @return PIResponse|null An array containing attributes and detail, or NULL. * @throws Exception */ - public static function authenticatePI(array &$state, array $formParams) + public static function authenticatePI(array &$state, array $formParams): ?PIResponse { assert('array' === gettype($state)); assert('array' === gettype($formParams)); @@ -229,7 +229,7 @@ public static function handleLogout() * @param array $config * @return PrivacyIDEA|null privacyIDEA object or null on error */ - public static function createPrivacyIDEAInstance(array $config) + public static function createPrivacyIDEAInstance(array $config): ?PrivacyIDEA { if (!empty($config['privacyideaServerURL'])) { @@ -414,7 +414,7 @@ public static function processPIResponse(string $stateId, PIResponse $response): * Determine the clients IP-Address. * @return string|null The IP-Address of the client. */ - public static function getClientIP() + public static function getClientIP(): ?string { $result = @$_SERVER['HTTP_X_FORWARDED_FOR'] ?: @$_SERVER['REMOTE_ADDR'] ?: @$_SERVER['HTTP_CLIENT_IP']; SimpleSAML_Logger::debug('privacyIDEA: client ip: ' . $result); @@ -447,4 +447,4 @@ public static function checkUidKey(array $config, array $state): array } return $config; } -} +} \ No newline at end of file