@akanass/rx-otp
Version:
HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.
194 lines (193 loc) • 4.24 kB
TypeScript
export declare const HOTP_GENERATE_SCHEMA: {
$schema: string;
$id: string;
title: string;
type: string;
properties: {
key: {};
key_format: {
$ref: string;
default: string;
};
counter: {
default: number;
};
counter_format: {
$ref: string;
default: string;
};
code_digits: {
$ref: string;
default: number;
};
add_checksum: {
$ref: string;
default: boolean;
};
truncation_offset: {
$ref: string;
default: number;
};
algorithm: {
$ref: string;
default: string;
};
};
required: string[];
dependencies: {
key: string[];
counter: string[];
};
additionalProperties: boolean;
allOf: ({
if: {
properties: {
key_format: {
const: string;
};
counter_format?: undefined;
};
};
then: {
properties: {
key: {
$ref: string;
};
counter?: undefined;
};
};
else: {
properties: {
key: {
$ref: string;
};
counter?: undefined;
};
};
} | {
if: {
properties: {
counter_format: {
const: string;
};
key_format?: undefined;
};
};
then: {
properties: {
counter: {
$ref: string;
};
key?: undefined;
};
};
else: {
properties: {
counter: {
$ref: string;
};
key?: undefined;
};
};
})[];
};
export declare const HOTP_VERIFY_SCHEMA: {
$schema: string;
$id: string;
title: string;
type: string;
properties: {
token: {
$ref: string;
};
key: {};
key_format: {
$ref: string;
default: string;
};
window: {
$ref: string;
default: number;
};
counter: {
default: number;
};
counter_format: {
$ref: string;
default: string;
};
add_checksum: {
$ref: string;
default: boolean;
};
truncation_offset: {
$ref: string;
default: number;
};
algorithm: {
$ref: string;
default: string;
};
previous_otp_allowed: {
$ref: string;
default: boolean;
};
};
required: string[];
dependencies: {
key: string[];
counter: string[];
};
additionalProperties: boolean;
allOf: ({
if: {
properties: {
key_format: {
const: string;
};
counter_format?: undefined;
};
};
then: {
properties: {
key: {
$ref: string;
};
counter?: undefined;
};
};
else: {
properties: {
key: {
$ref: string;
};
counter?: undefined;
};
};
} | {
if: {
properties: {
counter_format: {
const: string;
};
key_format?: undefined;
};
};
then: {
properties: {
counter: {
$ref: string;
};
key?: undefined;
};
};
else: {
properties: {
counter: {
$ref: string;
};
key?: undefined;
};
};
})[];
};