InMemoryMFAChallengeStore
@quik/mfa / InMemoryMFAChallengeStore
Class: InMemoryMFAChallengeStore
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:11
In-memory challenge store for MFA flows.
Extends
QAbstractMFAChallengeStore<Map<string,QMFAChallenge>>
Constructors
Constructor
new InMemoryMFAChallengeStore(
repository?):InMemoryMFAChallengeStore
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:17
Creates an in-memory challenge store.
Parameters
repository?
Map<string, QMFAChallenge> = ...
Optional map used as backing store.
Returns
InMemoryMFAChallengeStore
Overrides
QAbstractMFAChallengeStore.constructor
Properties
repository
protectedreadonlyrepository:Map
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:14
Persistence dependency used by concrete stores.
Inherited from
QAbstractMFAChallengeStore.repository
Accessors
logger
Get Signature
get
protectedlogger():IQLogger
Defined in: core/src/QObject.ts:15
The logger getter for the object.
Returns
IQLogger
Inherited from
QAbstractMFAChallengeStore.logger
name
Get Signature
get name():
string
Defined in: core/src/QObject.ts:8
Returns
string
Inherited from
QAbstractMFAChallengeStore.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
Inherited from
QAbstractMFAChallengeStore.cleanup
clear()
clear():
void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:52
Removes all challenges.
Returns
void
Inherited from
QAbstractMFAChallengeStore.clear
clearChallenges()
protectedclearChallenges():void
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:36
Removes all challenges.
Returns
void
Overrides
QAbstractMFAChallengeStore.clearChallenges
consume()
consume(
id):void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:38
Marks a challenge as consumed.
Parameters
id
string
Returns
void
Inherited from
QAbstractMFAChallengeStore.consume
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
QAbstractMFAChallengeStore.endSpan
fetchChallenge()
protectedfetchChallenge(id):QMFAChallenge
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:27
Fetches one challenge by id.
Parameters
id
string
Returns
Overrides
QAbstractMFAChallengeStore.fetchChallenge
get()
get(
id):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:30
Returns a challenge by id.
Parameters
id
string
Returns
Inherited from
QAbstractMFAChallengeStore.get
persistChallenge()
protectedpersistChallenge(challenge):QMFAChallenge
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:21
Persists a new or updated challenge.
Parameters
challenge
QMFAChallenge | Partial<QMFAChallenge>
Returns
Overrides
QAbstractMFAChallengeStore.persistChallenge
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
QAbstractMFAChallengeStore.recordSpanError
remove()
remove(
id):void
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:48
Removes one challenge.
Parameters
id
string
Returns
void
Inherited from
QAbstractMFAChallengeStore.remove
removeChallenge()
protectedremoveChallenge(id):void
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:32
Removes one challenge by id.
Parameters
id
string
Returns
void
Overrides
QAbstractMFAChallengeStore.removeChallenge
removeExpiredOrConsumed()
protectedremoveExpiredOrConsumed(now):number
Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:40
Removes expired or consumed challenges and returns the removal count.
Parameters
now
number
Returns
number
Overrides
QAbstractMFAChallengeStore.removeExpiredOrConsumed
save()
save(
challenge):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:26
Stores a newly issued challenge.
Parameters
challenge
QMFAChallenge | Partial<QMFAChallenge>
Returns
Inherited from
QAbstractMFAChallengeStore.save
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
QAbstractMFAChallengeStore.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
QAbstractMFAChallengeStore.startSpan
update()
update(
challenge):QMFAChallenge
Defined in: mfa/src/store/challenges/QAbstractMFAChallengeStore.ts:34
Persists challenge state changes.
Parameters
challenge
QMFAChallenge | Partial<QMFAChallenge>