QAbstractMFAChallengeStore
@quik/mfa / QAbstractMFAChallengeStore
Abstract Class: QAbstractMFAChallengeStore<TRepository>
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:12
Base challenge store for repository-backed implementations.
Implementors provide persistence primitives while this class keeps challenge
lifecycle behavior (consume, cleanup, and compatibility with
IQMFAChallengeStore) in one place.
Extends
QObject
Extended by
Type Parameters
TRepository
TRepository = unknown
Implements
Constructors
Constructor
new QAbstractMFAChallengeStore<
TRepository>(repository):QAbstractMFAChallengeStore<TRepository>
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:21
Creates a repository-backed challenge store.
Parameters
repository
TRepository
Persistence dependency.
Returns
QAbstractMFAChallengeStore<TRepository>
Overrides
QObject.constructor
Properties
repository
protectedreadonlyrepository:TRepository
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:14
Persistence dependency used by concrete stores.
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
cleanup()
cleanup(
now?):number
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:56
Removes expired or consumed challenges and returns the removal count.
Parameters
now?
number = ...
Returns
number
Implementation of
clear()
clear():
void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:52
Removes all challenges.
Returns
void
Implementation of
clearChallenges()
abstractprotectedclearChallenges():void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:67
Removes all challenges.
Returns
void
consume()
consume(
id):void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:38
Marks a challenge as consumed.
Parameters
id
string
Returns
void
Implementation of
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
fetchChallenge()
abstractprotectedfetchChallenge(id):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:63
Fetches one challenge by id.
Parameters
id
string
Returns
get()
get(
id):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:30
Returns a challenge by id.
Parameters
id
string
Returns
Implementation of
persistChallenge()
abstractprotectedpersistChallenge(challenge):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:61
Persists a new or updated challenge.
Parameters
challenge
QMFAChallenge | Partial<QMFAChallenge>
Returns
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
remove()
remove(
id):void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:48
Removes one challenge.
Parameters
id
string
Returns
void
Implementation of
removeChallenge()
abstractprotectedremoveChallenge(id):void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:65
Removes one challenge by id.
Parameters
id
string
Returns
void
removeExpiredOrConsumed()
abstractprotectedremoveExpiredOrConsumed(now):number
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:69
Removes expired or consumed challenges and returns the removal count.
Parameters
now
number
Returns
number
save()
save(
challenge):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:26
Stores a newly issued challenge.
Parameters
challenge
QMFAChallenge | Partial<QMFAChallenge>
Returns
Implementation of
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
update()
update(
challenge):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:34
Persists challenge state changes.
Parameters
challenge
QMFAChallenge | Partial<QMFAChallenge>