QTOTPFactor
@quik/mfa / QTOTPFactor
Class: QTOTPFactor
Defined in: mfa/src/factors/QTOTPFactor.ts:36
TOTP MFA factor implementation.
Extends
QObject
Implements
Constructors
Constructor
new QTOTPFactor(
options):QTOTPFactor
Defined in: mfa/src/factors/QTOTPFactor.ts:57
Creates a TOTP factor.
Parameters
options
Factor options.
Returns
QTOTPFactor
Overrides
QObject.constructor
Properties
digits
protectedreadonlydigits:number
Defined in: mfa/src/factors/QTOTPFactor.ts:40
TOTP digit count.
getSecret
protectedreadonlygetSecret:QTOTPSecretResolver
Defined in: mfa/src/factors/QTOTPFactor.ts:50
User secret resolver callback.
maxAttempts
protectedreadonlymaxAttempts:number
Defined in: mfa/src/factors/QTOTPFactor.ts:48
Maximum attempts for generated challenges.
method
readonlymethod:string
Defined in: mfa/src/factors/QTOTPFactor.ts:38
Factor method key.
Implementation of
stepSeconds
protectedreadonlystepSeconds:number
Defined in: mfa/src/factors/QTOTPFactor.ts:42
TOTP time step in seconds.
ttlMs
protectedreadonlyttlMs:number
Defined in: mfa/src/factors/QTOTPFactor.ts:46
Challenge TTL in milliseconds.
window
protectedreadonlywindow:number
Defined in: mfa/src/factors/QTOTPFactor.ts:44
Accepted drift window in number of steps.
Accessors
logger
Get Signature
get
protectedlogger():IQLogger
Defined in: core/src/QObject.ts:15
The logger getter for the object.
Returns
IQLogger
Inherited from
QObject.logger
name
Get Signature
get name():
string
Defined in: core/src/QObject.ts:8
Returns
string
Inherited from
QObject.name
Methods
endSpan()
protectedendSpan(span):void
Defined in: core/src/QObject.ts:35
End a span returned by startSpan.
Parameters
span
TelemetrySpan
The span to end.
Returns
void
Inherited from
QObject.endSpan
issue()
issue(
input):Promise<QMFAIssueResult>
Defined in: mfa/src/factors/QTOTPFactor.ts:73
Issues a challenge without generating a code.
Parameters
input
QMFAIssueInput | Partial<QMFAIssueInput>
Challenge input.
Returns
Promise<QMFAIssueResult>
Implementation of
recordSpanError()
protectedrecordSpanError(span,err):void
Defined in: core/src/QObject.ts:45
Record an exception on an active span.
Parameters
span
TelemetrySpan
The span to record the error on.
err
unknown
The error to record.
Returns
void
Inherited from
QObject.recordSpanError
setSpanAttribute()
protectedsetSpanAttribute(span,key,value):void
Defined in: core/src/QObject.ts:64
Set a single attribute on an active span.
Parameters
span
TelemetrySpan
The span to update.
key
string
Attribute key.
value
string | number | boolean
Attribute value.
Returns
void
Inherited from
QObject.setSpanAttribute
startSpan()
protectedstartSpan(spanName,options?):TelemetrySpan
Defined in: core/src/QObject.ts:26
Start a telemetry span for the given operation name. Returns undefined when no telemetry provider is active.
Parameters
spanName
string
Name of the span.
options?
TelemetrySpanOptions
Optional span attributes and kind.
Returns
TelemetrySpan
Inherited from
QObject.startSpan
verify()
verify(
input):Promise<boolean>
Defined in: mfa/src/factors/QTOTPFactor.ts:93
Verifies a user-provided TOTP against the resolved secret.
Parameters
input
QMFAVerifyInput | Partial<QMFAVerifyInput>
Verification input.
Returns
Promise<boolean>