@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * |
| 42 | 42 | * @throws Exception An exception if an unknown user storage is requested. |
| 43 | 43 | */ |
| 44 | - public static function getStorage(string $type="file", array $options=array(), LoggerInterface $logger): Tiqr_UserStorage_Interface |
|
| 44 | + public static function getStorage(string $type = "file", array $options = array(), LoggerInterface $logger): Tiqr_UserStorage_Interface |
|
| 45 | 45 | { |
| 46 | 46 | switch ($type) { |
| 47 | 47 | case "file": |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * @throws RuntimeException When the options configuration array misses a required parameter |
| 48 | 48 | * |
| 49 | 49 | */ |
| 50 | - public static function getStorage($type="file", $options=array(), LoggerInterface $logger) |
|
| 50 | + public static function getStorage($type = "file", $options = array(), LoggerInterface $logger) |
|
| 51 | 51 | { |
| 52 | 52 | switch ($type) { |
| 53 | 53 | case "file": |
@@ -36,8 +36,7 @@ |
||
| 36 | 36 | // response as the client calculated. |
| 37 | 37 | try { |
| 38 | 38 | $expected = OCRA::generateOCRA($this->_ocraSuite, $userSecret, "", $challenge, "", $sessionInformation, ""); |
| 39 | - } |
|
| 40 | - catch (Exception $e) { |
|
| 39 | + } catch (Exception $e) { |
|
| 41 | 40 | $this->logger->warning(sprintf('Error calculating OCRA response for user "%s"', $userId), array('exception'=>$e)); |
| 42 | 41 | return false; |
| 43 | 42 | } |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | 'verifyResponse for user "%s" failed', |
| 82 | 82 | $userId |
| 83 | 83 | ), |
| 84 | - array( 'exception' => $e) |
|
| 84 | + array('exception' => $e) |
|
| 85 | 85 | ); |
| 86 | 86 | return false; |
| 87 | 87 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use Psr\Log\LoggerInterface; |
| 21 | 21 | |
| 22 | -require_once(__DIR__ . '/../OATH/OCRAParser.php'); |
|
| 22 | +require_once(__DIR__.'/../OATH/OCRAParser.php'); |
|
| 23 | 23 | |
| 24 | 24 | abstract class Tiqr_OcraService_Abstract implements Tiqr_OcraService_Interface |
| 25 | 25 | { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $this->logger = $logger; |
| 38 | 38 | |
| 39 | 39 | // Set the OCRA suite |
| 40 | - $this->_ocraSuite = $config['ocra.suite'] ?? 'OCRA-1:HOTP-SHA1-6:QH10-S'; // Use tiqr server default suite |
|
| 40 | + $this->_ocraSuite = $config['ocra.suite'] ?? 'OCRA-1:HOTP-SHA1-6:QH10-S'; // Use tiqr server default suite |
|
| 41 | 41 | $this->_ocraParser = new OATH_OCRAParser($this->_ocraSuite); |
| 42 | 42 | } |
| 43 | 43 | |