Skip to content

Commit

Permalink
[TASK] Minor CGL changes
Browse files Browse the repository at this point in the history
  • Loading branch information
derhansen committed Jan 5, 2019
1 parent ced6622 commit 575a34c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/YubikeyAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function checkOtp($yubikeyOtp)
$ret = false;
$otp = trim($yubikeyOtp);

// Verify if the OTP is valid ?
// Verify if the OTP is valid
if ($this->verifyOtp($otp)) {
$ret = true;
}
Expand Down Expand Up @@ -106,7 +106,6 @@ public function verifyHmac($response, $yubicoApiKey)
*/
public function verifyOtp($otp)
{

// Get the global API ID/KEY
$yubicoApiId = trim($this->getConfig('yubikeyClientId'));
$yubicoApiKey = trim($this->getConfig('yubikeyClientKey'));
Expand All @@ -132,6 +131,7 @@ public function verifyOtp($otp)
);
$signature = preg_replace('/\+/', '%2B', $signature);
$parameters .= '&h=' . $signature;
$urls = [];
foreach ($apiUrls as $apiUrl) {
$urls[] = $apiUrl . '?' . $parameters;
}
Expand All @@ -148,6 +148,7 @@ public function verifyOtp($otp)
}

$mh = curl_multi_init();
$connections = [];
foreach ($urls as $i => $url) {
$connections[$i] = curl_init($url);
$curlOptions[CURLOPT_URL] = $url;
Expand Down

0 comments on commit 575a34c

Please sign in to comment.