Skip to main content

InMemoryOAuthConsentStore

@quik/oauth-server


@quik/oauth-server / InMemoryOAuthConsentStore

Class: InMemoryOAuthConsentStore

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

In-memory store for OAuth consents.

Extends​

Implements​

Constructors​

Constructor​

new InMemoryOAuthConsentStore(): InMemoryOAuthConsentStore

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:12

Returns​

InMemoryOAuthConsentStore

Overrides​

QAbstractOAuthConsentStore.constructor

Properties​

repository​

protected readonly repository: Map

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:16

Persistence dependency used by concrete stores.

Inherited from​

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

QAbstractOAuthConsentStore.logger


name​

Get Signature​

get name(): string

Defined in: core/src/QObject.ts:8

Returns​

string

Inherited from​

QAbstractOAuthConsentStore.name

Methods​

cleanup()​

cleanup(now?): number

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:58

Removes revoked entries and returns removed count.

Parameters​

now?​

number = ...

Returns​

number

Implementation of​

IQOAuthConsentStore.cleanup

Inherited from​

QAbstractOAuthConsentStore.cleanup


clear()​

clear(): void

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:54

Clears all consents.

Returns​

void

Implementation of​

IQOAuthConsentStore.clear

Inherited from​

QAbstractOAuthConsentStore.clear


clearConsents()​

protected clearConsents(): void

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:41

Removes all consents.

Returns​

void

Overrides​

QAbstractOAuthConsentStore.clearConsents


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​

QAbstractOAuthConsentStore.endSpan


fetchConsent()​

protected fetchConsent(id): QOAuthConsent

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:22

Fetches one consent by id.

Parameters​

id​

string

Returns​

QOAuthConsent

Overrides​

QAbstractOAuthConsentStore.fetchConsent


find()​

find(clientId, userId): QOAuthConsent

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:36

Returns one consent by client/user pair.

Parameters​

clientId​

string

userId​

string

Returns​

QOAuthConsent

Implementation of​

IQOAuthConsentStore.find

Inherited from​

QAbstractOAuthConsentStore.find


findConsent()​

protected findConsent(clientId, userId): QOAuthConsent

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:27

Finds one consent by client/user pair.

Parameters​

clientId​

string

userId​

string

Returns​

QOAuthConsent

Overrides​

QAbstractOAuthConsentStore.findConsent


get()​

get(id): QOAuthConsent

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:32

Returns one consent by id.

Parameters​

id​

string

Returns​

QOAuthConsent

Implementation of​

IQOAuthConsentStore.get

Inherited from​

QAbstractOAuthConsentStore.get


persistConsent()​

protected persistConsent(consent): QOAuthConsent

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:16

Persists a new or updated consent.

Parameters​

QOAuthConsent

Returns​

QOAuthConsent

Overrides​

QAbstractOAuthConsentStore.persistConsent


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​

QAbstractOAuthConsentStore.recordSpanError


remove()​

remove(id): void

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:50

Removes one consent entry.

Parameters​

id​

string

Returns​

void

Implementation of​

IQOAuthConsentStore.remove

Inherited from​

QAbstractOAuthConsentStore.remove


removeConsent()​

protected removeConsent(id): void

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:37

Removes one consent by id.

Parameters​

id​

string

Returns​

void

Overrides​

QAbstractOAuthConsentStore.removeConsent


removeRevoked()​

protected removeRevoked(_now): number

Defined in: oauth-server/src/store/InMemoryOAuthConsentStore.ts:45

Removes revoked consent entries and returns the removal count.

Parameters​

_now​

number

Returns​

number

Overrides​

QAbstractOAuthConsentStore.removeRevoked


revoke()​

revoke(id): void

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:40

Marks one consent as revoked.

Parameters​

id​

string

Returns​

void

Implementation of​

IQOAuthConsentStore.revoke

Inherited from​

QAbstractOAuthConsentStore.revoke


save()​

save(consent): QOAuthConsent

Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:28

Persists one consent entry.

Parameters​

QOAuthConsent

Returns​

QOAuthConsent

Implementation of​

IQOAuthConsentStore.save

Inherited from​

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

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

QAbstractOAuthConsentStore.startSpan