mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
20 lines
529 B
TypeScript
20 lines
529 B
TypeScript
// Type definitions for otplib 7.0
|
|
// Project: https://yeojz.github.io/otplib
|
|
// Definitions by: Soner Köksal <https://github.com/renjfk>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export namespace authenticator {
|
|
interface VerifyOptions {
|
|
token: string;
|
|
secret: string;
|
|
}
|
|
|
|
function generateSecret(): string;
|
|
|
|
function generate(secret: string): string;
|
|
|
|
function check(token: string, secret: string): boolean;
|
|
|
|
function verify(options: VerifyOptions): boolean;
|
|
}
|