@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function verify(string $token) |
114 | 114 | { |
115 | - $parameters = "id=" . $this->id . "&otp=" . $token; |
|
115 | + $parameters = "id=".$this->id."&otp=".$token; |
|
116 | 116 | // Generate signature |
117 | 117 | if ($this->key !== "") { |
118 | 118 | $signature = base64_encode(hash_hmac('sha1', $parameters, $this->key, true)); |
119 | - $parameters .= '&h=' . $signature; |
|
119 | + $parameters .= '&h='.$signature; |
|
120 | 120 | } |
121 | 121 | // Support https |
122 | - $url = "https://api.yubico.com/wsapi/verify?" . $parameters; |
|
122 | + $url = "https://api.yubico.com/wsapi/verify?".$parameters; |
|
123 | 123 | |
124 | 124 | $httpUtils = new \SimpleSAML\Utils\HTTP(); |
125 | 125 | /** @var string $responseMsg */ |
@@ -143,7 +143,7 @@ discard block |
||
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 |
||
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; |