Skip to main content

InMemoryMFAChallengeStore

@quik/mfa


@quik/mfa / InMemoryMFAChallengeStore

Class: InMemoryMFAChallengeStore

Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:11

In-memory challenge store for MFA flows.

Extends

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

protected readonly repository: 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 protected logger(): 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()

protected clearChallenges(): 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()

protected endSpan(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()

protected fetchChallenge(id): QMFAChallenge

Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:27

Fetches one challenge by id.

Parameters

id

string

Returns

QMFAChallenge

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

QMFAChallenge

Inherited from

QAbstractMFAChallengeStore.get


persistChallenge()

protected persistChallenge(challenge): QMFAChallenge

Defined in: mfa/src/store/challenges/InMemoryMFAChallengeStore.ts:21

Persists a new or updated challenge.

Parameters

challenge

QMFAChallenge | Partial<QMFAChallenge>

Returns

QMFAChallenge

Overrides

QAbstractMFAChallengeStore.persistChallenge


recordSpanError()

protected recordSpanError(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()

protected removeChallenge(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()

protected removeExpiredOrConsumed(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

QMFAChallenge

Inherited from

QAbstractMFAChallengeStore.save


setSpanAttribute()

protected setSpanAttribute(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()

protected startSpan(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>

Returns

QMFAChallenge

Inherited from

QAbstractMFAChallengeStore.update