Skip to main content

InMemoryOAuthAuthorizationCodeStore

@quik/oauth-server


@quik/oauth-server / InMemoryOAuthAuthorizationCodeStore

Class: InMemoryOAuthAuthorizationCodeStore

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:10

In-memory store for OAuth authorization codes.

Extends​

  • QObject

Implements​

Constructors​

Constructor​

new InMemoryOAuthAuthorizationCodeStore(): InMemoryOAuthAuthorizationCodeStore

Returns​

InMemoryOAuthAuthorizationCodeStore

Inherited from​

QObject.constructor

Properties​

codes​

protected readonly codes: Map<string, QOAuthAuthorizationCode>

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:11

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​

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: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:42

Removes expired or consumed entries and returns removed count.

Parameters​

now?​

number = ...

Returns​

number

Implementation of​

IQOAuthAuthorizationCodeStore.cleanup


clear()​

clear(): void

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:38

Clears all codes.

Returns​

void

Implementation of​

IQOAuthAuthorizationCodeStore.clear


consume()​

consume(code): void

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:24

Marks one code as consumed.

Parameters​

code​

string

Returns​

void

Implementation of​

IQOAuthAuthorizationCodeStore.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​

QObject.endSpan


get()​

get(code): QOAuthAuthorizationCode

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:19

Returns one code by value.

Parameters​

code​

string

Returns​

QOAuthAuthorizationCode

Implementation of​

IQOAuthAuthorizationCodeStore.get


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​

QObject.recordSpanError


remove()​

remove(code): void

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:34

Removes one code by value.

Parameters​

code​

string

Returns​

void

Implementation of​

IQOAuthAuthorizationCodeStore.remove


save()​

save(code): QOAuthAuthorizationCode

Defined in: oauth-server/src/store/InMemoryOAuthAuthorizationCodeStore.ts:13

Persists one authorization code.

Parameters​

code​

QOAuthAuthorizationCode

Returns​

QOAuthAuthorizationCode

Implementation of​

IQOAuthAuthorizationCodeStore.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​

QObject.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​

QObject.startSpan