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

37 lines
1.2 KiB
PHP
Raw Normal View History

<?php # -*- php -*-
2009-03-10 22:50:35 +00:00
# For the validation interface.
2009-03-10 22:50:35 +00:00
$baseParams = array ();
$baseParams['__YKVAL_DB_HOST__'] = 'localhost';
$baseParams['__YKVAL_DB_NAME__'] = 'ykval';
$baseParams['__YKVAL_DB_USER__'] = 'ykval_verifier';
$baseParams['__YKVAL_DB_PW__'] = 'password';
# For the get-api-key service.
$baseParams['__YKGAK_DB_HOST__'] = $baseParams['__YKVAL_DB_HOST__'];
$baseParams['__YKGAK_DB_NAME__'] = $baseParams['__YKVAL_DB_NAME__'];
$baseParams['__YKGAK_DB_USER__'] = 'ykval_getapikey';
$baseParams['__YKGAK_DB_PW__'] = 'password';
$baseParams['__YKGAK_ID__'] = '';
$baseParams['__YKGAK_KEY__'] = '';
// 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
?>