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"); 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