2009-04-27 17:57:24 +00:00
|
|
|
<?php # -*- php -*-
|
2009-03-10 22:50:35 +00:00
|
|
|
|
|
|
|
//// DB
|
|
|
|
//
|
|
|
|
$baseParams = array ();
|
|
|
|
$baseParams['__DB_HOST__'] = 'localhost';
|
|
|
|
$baseParams['__DB_USER__'] = 'username';
|
|
|
|
$baseParams['__DB_PW__'] = 'password';
|
|
|
|
$baseParams['__DB_NAME__'] = 'yubico';
|
2009-04-27 17:57:24 +00:00
|
|
|
|
|
|
|
// 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) {
|
|
|
|
return array("http://another-ykkms.example.com/wsapi/decrypt/?otp=$otp");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (preg_match ("/^dteffujehknh/", $otp)) {
|
|
|
|
return array("http://different-ykkms.example.com/wsapi/decrypt/?otp=$otp");
|
|
|
|
}
|
|
|
|
|
|
|
|
return array(
|
|
|
|
"http://ykkms1.example.com/wsapi/decrypt/?otp=$otp",
|
|
|
|
"http://ykkms2.example.com/wsapi/decrypt/?otp=$otp",
|
|
|
|
);
|
|
|
|
}
|
2009-03-10 22:50:35 +00:00
|
|
|
|
|
|
|
?>
|