diff --git a/lib/totp.js b/lib/totp.js index 8acac05..fbedfdb 100644 --- a/lib/totp.js +++ b/lib/totp.js @@ -24,7 +24,7 @@ function getOtp(pubkey) { .setRequestBody({ "secret": pubkey }) - .open("POST", TFA_API_BASE_URL + "/tfa/otp") + .open("POST", TFA_API_BASE_URL + "/otp") .send() .responseBody ; @@ -34,7 +34,7 @@ function getOtp(pubkey) { exports.getPubKey = getPubKey; exports.getOtp = getOtp; -exports.VERSIONINFO = "Time-based OTP client (totp.js) version 1.0"; +exports.VERSIONINFO = "Time-based OTP client (totp.js) version 1.0.1"; exports.AUTHOR = "gnh1201@catswords.re.kr"; exports.global = global; exports.require = global.require; @@ -42,6 +42,7 @@ exports.require = global.require; /* // Example: var TOTP = require("lib/totp"); -console.log(TOTP.getPubKey()); // get public key. e.g. 6Y4R 3AQN 4TTV CEQT -console.log(TOTP.getOtp('6Y4R 3AQN 4TTV CEQT')); // get OTP code. e.g. 317884 +console.log(TOTP.getPubKey()); // get public key. e.g. ih6vdfuh75ugdcmruaexhfh3miiwdqhx +console.log(TOTP.getOtp('ih6vdfuh75ugdcmruaexhfh3miiwdqhx')); // get OTP code. (32 characters key) e.g. 774372 +console.log(TOTP.getOtp('6Y4R 3AQN 4TTV CEQT')); // get OTP code. (16 characters key) e.g. 317884 */