Skip to main content

Class: OAuthRefreshTokenMongo

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:44

Implementation of the OAuthRefreshToken interface for storage in a MongoDB database. If SQL is desired, please use models.sql.OAuthRefreshTokenSQL instead.

Extends​

  • BaseMongoEntity

Implements​

Constructors​

Constructor​

new OAuthRefreshTokenMongo(other?): OAuthRefreshTokenMongo

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:79

Parameters​

other?​

Partial<OAuthRefreshTokenMongo>

Returns​

OAuthRefreshTokenMongo

Overrides​

BaseMongoEntity.constructor

Properties​

_id?​

optional _id?: any

Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseMongoEntity.d.ts:11

The internal unique identifier used by MongoDB.

Inherited from​

BaseMongoEntity._id


clientId​

clientId: string = ""

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:52

The uid of the Client this token was issued to.

Implementation of​

OAuthRefreshToken.clientId


dateCreated​

dateCreated: Date

Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:18

The date and time that the entity was created.

Implementation of​

OAuthRefreshToken.dateCreated

Inherited from​

BaseMongoEntity.dateCreated


dateModified​

dateModified: Date

Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:22

The date and time that the entity was last modified.

Implementation of​

OAuthRefreshToken.dateModified

Inherited from​

BaseMongoEntity.dateModified


expiresAt​

expiresAt: Date

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:66

When this token expires.

Implementation of​

OAuthRefreshToken.expiresAt


familyId​

familyId: string = ""

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:63

Groups every token produced by rotating a single original refresh token into one lineage. A brand new grant starts a fresh familyId; each rotation carries the same familyId forward. Presenting a token whose revoked is already true — a replayed, already-rotated-out token — revokes every token sharing its familyId, per RFC 9700 §4.14.2.

Implementation of​

OAuthRefreshToken.familyId


replacedByHash?​

optional replacedByHash?: string

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:77

The tokenHash of the token that replaced this one via rotation, for audit — distinguishes a routine rotation from an explicit revocation.

Implementation of​

OAuthRefreshToken.replacedByHash


revoked​

revoked: boolean = false

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:69

Set to true once this token has either been rotated (see replacedByHash) or explicitly revoked.

Implementation of​

OAuthRefreshToken.revoked


revokedAt?​

optional revokedAt?: Date

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:73

When this token was revoked, if it has been.

Implementation of​

OAuthRefreshToken.revokedAt


scope​

scope: string = ""

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:59

The space-delimited set of scopes this token (and any it rotates into) is authorized for.

Implementation of​

OAuthRefreshToken.scope


tokenHash​

tokenHash: string = ""

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:48

The SHA-256 hex digest of the opaque token. The raw token itself is never persisted.

Implementation of​

OAuthRefreshToken.tokenHash


uid​

uid: string

Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:14

The universally unique identifier of the entity.

Implementation of​

OAuthRefreshToken.uid

Inherited from​

BaseMongoEntity.uid


userUid?​

optional userUid?: string

Defined in: auth/src/models/mongo/OAuthRefreshTokenMongo.ts:56

The uid of the User (resource owner) this token acts on behalf of. Absent for a token issued via the client_credentials grant, which has no resource owner.

Implementation of​

OAuthRefreshToken.userUid


version​

version: number

Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:26

The optimistic lock version.

Implementation of​

OAuthRefreshToken.version

Inherited from​

BaseMongoEntity.version