mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-03-04 03:29:18 +01:00
Refactor.
- get rid of log_format() function. - was only used in one place and it just complicates things.
This commit is contained in:
parent
4b79e45683
commit
7503d42699
@ -74,28 +74,6 @@ function getHttpVal ($key, $default)
|
|||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_format()
|
|
||||||
{
|
|
||||||
$str = "";
|
|
||||||
|
|
||||||
foreach (func_get_args() as $msg)
|
|
||||||
{
|
|
||||||
if (is_array($msg))
|
|
||||||
{
|
|
||||||
foreach ($msg as $key => $value)
|
|
||||||
{
|
|
||||||
$str .= "$key=$value ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$str .= $msg . " ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sign a http query string in the array of key-value pairs
|
// Sign a http query string in the array of key-value pairs
|
||||||
// return b64 encoded hmac hash
|
// return b64 encoded hmac hash
|
||||||
function sign($a, $apiKey, $logger)
|
function sign($a, $apiKey, $logger)
|
||||||
@ -249,7 +227,7 @@ function KSMdecryptOTP($urls, $logger, $curlopts)
|
|||||||
|
|
||||||
$response = array_shift($response);
|
$response = array_shift($response);
|
||||||
|
|
||||||
$logger->log(LOG_DEBUG, log_format('YK-KSM response: ', $response));
|
$logger->log(LOG_DEBUG, "YK-KSM response: $response");
|
||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user