mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-05-05 00:00:03 +08:00
fix: export not default class
This commit is contained in:
+3
-3
@@ -4,12 +4,12 @@
|
||||
* @author : Gin (gin.lance.inside@hotmail.com)
|
||||
*/
|
||||
|
||||
export default class Base32 {
|
||||
export class Base32 {
|
||||
static decode() {
|
||||
console.log("static Base32.decode");
|
||||
return "static Base32.decode";
|
||||
}
|
||||
|
||||
static random_gen() {
|
||||
console.log("static Base32.random_gen");
|
||||
return "static Base32.random_gen";
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
import OTP from './otp';
|
||||
|
||||
export default class HOTP extends OTP {
|
||||
export class HOTP extends OTP {
|
||||
/**
|
||||
* Generate the OTP with the given count
|
||||
*
|
||||
@@ -22,7 +22,7 @@ export default class HOTP extends OTP {
|
||||
* ```
|
||||
*/
|
||||
at(count) {
|
||||
console.log("HOTP.at");
|
||||
return "HOTP.at";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,6 +47,6 @@ export default class HOTP extends OTP {
|
||||
* ```
|
||||
*/
|
||||
verify(otp, counter) {
|
||||
console.log("HOTP.verify");
|
||||
return "HOTP.verify";
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
* @author : Gin (gin.lance.inside@hotmail.com)
|
||||
*/
|
||||
|
||||
export default class OTP {
|
||||
export class OTP {
|
||||
/**
|
||||
* This constructor will create OTP instance.
|
||||
*
|
||||
@@ -41,7 +41,7 @@ export default class OTP {
|
||||
* @return {OTP}
|
||||
*/
|
||||
generate_otp(input) {
|
||||
console.log("OTP.generate_otp");
|
||||
return "OTP.generate_otp";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
import OTP from './otp';
|
||||
|
||||
export default class TOTP extends OTP {
|
||||
export class TOTP extends OTP {
|
||||
/**
|
||||
* @param {secret}
|
||||
* @type {String}
|
||||
@@ -35,7 +35,7 @@ export default class TOTP extends OTP {
|
||||
* ```
|
||||
*/
|
||||
now() {
|
||||
console.log("TOTP.now");
|
||||
return "TOTP.now";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,6 +62,6 @@ export default class TOTP extends OTP {
|
||||
* ```
|
||||
*/
|
||||
verify(otp, time=null) {
|
||||
console.log("TOTP.verify");
|
||||
return "TOTP.verify";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user