1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-01-20 10:52:15 +01:00
yubikey-val/ykval-config.php

30 lines
885 B
PHP
Raw Normal View History

<?php # -*- php -*-
2009-03-10 22:50:35 +00:00
//// DB
//
$baseParams = array ();
$baseParams['__DB_HOST__'] = 'localhost';
2009-04-27 19:03:22 +00:00
$baseParams['__DB_USER__'] = 'ykval_verifier';
2009-03-10 22:50:35 +00:00
$baseParams['__DB_PW__'] = 'password';
2009-04-27 19:03:22 +00:00
$baseParams['__DB_NAME__'] = 'ykval';
// otp2ksmurls: Return array of YK-KSM URLs for decrypting OTP for
// CLIENT. The URLs must be fully qualified, i.e., contain the OTP
// itself.
function otp2ksmurls ($otp, $client) {
if ($client == 42) {
2009-05-05 10:47:22 +00:00
return array("http://another-ykkms.example.com/wsapi/decrypt?otp=$otp");
}
if (preg_match ("/^dteffujehknh/", $otp)) {
2009-05-05 10:47:22 +00:00
return array("http://different-ykkms.example.com/wsapi/decrypt?otp=$otp");
}
return array(
2009-05-05 10:47:22 +00:00
"http://ykkms1.example.com/wsapi/decrypt?otp=$otp",
"http://ykkms2.example.com/wsapi/decrypt?otp=$otp",
);
}
2009-03-10 22:50:35 +00:00
?>