mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-24 17:41:17 +00:00
Update OTP endpoint and version info in totp.js
Changed the OTP API endpoint from '/tfa/otp' to '/otp' and updated VERSIONINFO to 1.0.1. Improved example comments to clarify key formats and OTP code usage.
This commit is contained in:
parent
dfc18cfd7d
commit
d443f6270c
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user