QAbstractOAuthConsentStore
@quik/oauth-server / QAbstractOAuthConsentStore
Abstract Class: QAbstractOAuthConsentStore<TRepository>
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:14
Base consent store for repository-backed implementations.
Implementors provide persistence primitives while this class keeps consent
lifecycle behavior (revoke, cleanup, and compatibility with
IQOAuthConsentStore) in one place.
Extends
QObject
Extended by
Type Parameters
TRepository
TRepository = unknown
Implements
Constructors
Constructor
new QAbstractOAuthConsentStore<
TRepository>(repository):QAbstractOAuthConsentStore<TRepository>
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:23
Creates a repository-backed consent store.
Parameters
repository
TRepository
Persistence dependency.
Returns
QAbstractOAuthConsentStore<TRepository>
Overrides
QObject.constructor
Properties
repository
protectedreadonlyrepository:TRepository
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:16
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: oauth-server/src/store/QAbstractOAuthConsentStore.ts:58
Removes revoked entries and returns removed count.
Parameters
now?
number = ...
Returns
number
Implementation of
clear()
clear():
void
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:54
Clears all consents.
Returns
void
Implementation of
clearConsents()
abstractprotectedclearConsents():void
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:71
Removes all consents.
Returns
void
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
fetchConsent()
abstractprotectedfetchConsent(id):QOAuthConsent
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:65
Fetches one consent by id.
Parameters
id
string
Returns
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
Implementation of
findConsent()
abstractprotectedfindConsent(clientId,userId):QOAuthConsent
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:67
Finds one consent by client/user pair.
Parameters
clientId
string
userId
string
Returns
get()
get(
id):QOAuthConsent
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:32
Returns one consent by id.
Parameters
id
string
Returns
Implementation of
persistConsent()
abstractprotectedpersistConsent(consent):QOAuthConsent
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:63
Persists a new or updated consent.
Parameters
consent
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: oauth-server/src/store/QAbstractOAuthConsentStore.ts:50
Removes one consent entry.
Parameters
id
string
Returns
void
Implementation of
removeConsent()
abstractprotectedremoveConsent(id):void
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:69
Removes one consent by id.
Parameters
id
string
Returns
void
removeRevoked()
abstractprotectedremoveRevoked(now):number
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:73
Removes revoked consent entries and returns the removal count.
Parameters
now
number
Returns
number
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
save()
save(
consent):QOAuthConsent
Defined in: oauth-server/src/store/QAbstractOAuthConsentStore.ts:28
Persists one consent entry.
Parameters
consent
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