Class: OAuthRefreshTokenSQL
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:39
Implementation of the OAuthRefreshToken interface for storage in a SQL database. If MongoDB is desired,
please use models.mongo.OAuthRefreshTokenMongo instead.
Extends
BaseEntity
Implements
Constructors
Constructor
new OAuthRefreshTokenSQL(
other?):OAuthRefreshTokenSQL
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:74
Parameters
other?
Partial<OAuthRefreshTokenSQL>
Returns
OAuthRefreshTokenSQL
Overrides
BaseEntity.constructor
Properties
clientId
clientId:
string=""
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:47
The uid of the Client this token was issued to.
Implementation of
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
Inherited from
BaseEntity.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
BaseEntity.dateModified
expiresAt
expiresAt:
Date
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:61
When this token expires.
Implementation of
familyId
familyId:
string=""
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:58
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
replacedByHash?
optionalreplacedByHash?:string
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:72
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/sql/OAuthRefreshTokenSQL.ts:64
Set to true once this token has either been rotated (see replacedByHash) or explicitly revoked.
Implementation of
revokedAt?
optionalrevokedAt?:Date
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:68
When this token was revoked, if it has been.
Implementation of
scope
scope:
string=""
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:54
The space-delimited set of scopes this token (and any it rotates into) is authorized for.
Implementation of
tokenHash
tokenHash:
string=""
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:43
The SHA-256 hex digest of the opaque token. The raw token itself is never persisted.
Implementation of
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
Inherited from
BaseEntity.uid
userUid?
optionaluserUid?:string
Defined in: auth/src/models/sql/OAuthRefreshTokenSQL.ts:51
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
version
version:
number
Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:26
The optimistic lock version.
Implementation of
Inherited from
BaseEntity.version