Passed
Push — master ( 821ff8...1ad597 )
by Tim
08:27
created
lib/Auth/Process/OTP2YubiPrefix.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         Assert::keyExists($state, 'Attributes');
64 64
         $attributes = $state['Attributes'];
65 65
 
66
-        Logger::debug('OTP2YubiPrefix: enter with attributes: ' . implode(',', array_keys($attributes)));
66
+        Logger::debug('OTP2YubiPrefix: enter with attributes: '.implode(',', array_keys($attributes)));
67 67
 
68 68
         $otps = $attributes['otp'];
69 69
         $otp = $otps['0'];
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
         $attributes['yubiPrefix'] = [$identity];
75 75
 
76 76
         Logger::info(
77
-            'OTP2YubiPrefix: otp: ' . $otp . ' identity: ' . $identity . ' (otp keys: '
78
-            . implode(',', array_keys($otps)) . ')'
77
+            'OTP2YubiPrefix: otp: '.$otp.' identity: '.$identity.' (otp keys: '
78
+            . implode(',', array_keys($otps)).')'
79 79
         );
80 80
 
81 81
         unset($attributes['otp']);
82 82
 
83
-        Logger::debug('OTP2YubiPrefix: leaving with attributes: ' . implode(',', array_keys($attributes)));
83
+        Logger::debug('OTP2YubiPrefix: leaving with attributes: '.implode(',', array_keys($attributes)));
84 84
     }
85 85
 }
Please login to merge, or discard this patch.
libextinc/Yubico.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function verify(string $token)
115 115
     {
116
-        $parameters = "id=" . $this->id . "&otp=" . $token;
116
+        $parameters = "id=".$this->id."&otp=".$token;
117 117
         // Generate signature
118 118
         if ($this->key !== "") {
119 119
             $signature = base64_encode(hash_hmac('sha1', $parameters, $this->key, true));
120
-            $parameters .= '&h=' . $signature;
120
+            $parameters .= '&h='.$signature;
121 121
         }
122 122
         // Support https
123
-        $url = "https://api.yubico.com/wsapi/verify?" . $parameters;
123
+        $url = "https://api.yubico.com/wsapi/verify?".$parameters;
124 124
 
125 125
         /** @var string $responseMsg */
126 126
         $responseMsg = \SimpleSAML\Utils\HTTP::fetch($url);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $response[$row[0]] = (isset($row[1])) ? $row[1] : "";
144 144
             }
145 145
 
146
-            $check = 'status=' . $response['status'] . '&t=' . $response['t'];
146
+            $check = 'status='.$response['status'].'&t='.$response['t'];
147 147
             $checksignature = base64_encode(hash_hmac('sha1', $check, $this->key, true));
148 148
 
149 149
             if ($response['h'] != $checksignature) {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         }
153 153
 
154 154
         if ($status != 'OK') {
155
-            throw new Exception('Status was not OK: ' . $status);
155
+            throw new Exception('Status was not OK: '.$status);
156 156
         }
157 157
 
158 158
         return true;
Please login to merge, or discard this patch.
lib/Auth/Source/YubiKey.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         Assert::isInstanceOf(
146 146
             $source,
147 147
             YubiKey::class,
148
-            'Could not find authentication source with id ' . $state[self::AUTHID]
148
+            'Could not find authentication source with id '.$state[self::AUTHID]
149 149
         );
150 150
 
151 151
         try {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     protected function login(string $otp): array
206 206
     {
207
-        require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/libextinc/Yubico.php';
207
+        require_once dirname(dirname(dirname(dirname(__FILE__)))).'/libextinc/Yubico.php';
208 208
 
209 209
         $yubi = new \Auth_Yubico($this->yubi_id, $this->yubi_key);
210 210
         try {
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
             $attributes = ['uid' => [$uid]];
214 214
         } catch (Exception $e) {
215 215
             Logger::info(
216
-                'YubiKey:' . $this->authId . ': Validation error (otp ' . $otp . '), debug output: '
216
+                'YubiKey:'.$this->authId.': Validation error (otp '.$otp.'), debug output: '
217 217
                 . $yubi->getLastResponse()
218 218
             );
219 219
             throw new Error\Error('WRONGUSERPASS', $e);
220 220
         }
221 221
 
222 222
         Logger::info(
223
-            'YubiKey:' . $this->authId . ': YubiKey otp ' . $otp . ' validated successfully: '
223
+            'YubiKey:'.$this->authId.': YubiKey otp '.$otp.' validated successfully: '
224 224
             . $yubi->getLastResponse()
225 225
         );
226 226
         return $attributes;
Please login to merge, or discard this patch.