2017-12-16 15:10:52 +01:00
|
|
|
/**
|
|
|
|
* OTP HOTP tests.
|
|
|
|
*
|
|
|
|
* @author bwhitn [brian.m.whitney@outlook.com]
|
|
|
|
*
|
|
|
|
* @copyright Crown Copyright 2017
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
2019-07-09 13:23:59 +02:00
|
|
|
import TestRegister from "../../lib/TestRegister.mjs";
|
2017-12-16 15:10:52 +01:00
|
|
|
|
|
|
|
TestRegister.addTests([
|
|
|
|
{
|
|
|
|
name: "Generate HOTP",
|
|
|
|
input: "12345678901234567890",
|
|
|
|
expectedOutput: "URI: otpauth://hotp/OTPAuthentication?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ\n\nPassword: 755224",
|
|
|
|
recipeConfig: [
|
|
|
|
{
|
|
|
|
op: "Generate HOTP",
|
|
|
|
args: ["", 32, 6, 0],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]);
|