Skip to main content

Interface: User

Defined in: src/models/types.ts:168

Defines a single user's account within the system.

Extends

  • BaseEntity.JWTUser

Properties

dateCreated

dateCreated: Date

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

The date and time that the entity was created.

Inherited from

BaseEntity.dateCreated


dateModified

dateModified: Date

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

The date and time that the entity was last modified.

Inherited from

BaseEntity.dateModified


elevated?

optional elevated?: number

Defined in: node_modules/@rapidrest/core/dist/types/JWTUtils.d.ts:15

The timestamp that the user was granted elevated privileges. A negative value indicates the user is unprivileged. Default value is -1.

Inherited from

JWTUser.elevated


requireMFA?

optional requireMFA?: boolean

Defined in: src/models/types.ts:174

Set to true to require multi-factor authentication for this account, otherwise set to false.

Default value is set by @Config("auth:require_mfa").


roles

roles: string[]

Defined in: node_modules/@rapidrest/core/dist/types/JWTUtils.d.ts:19

The list of roles (by name) that the user is a member of and will inherit the permissions of.

Inherited from

JWTUser.roles


scopes

scopes: string[]

Defined in: node_modules/@rapidrest/core/dist/types/JWTUtils.d.ts:23

The list of auth scopes that the user has been granted permission for.

Inherited from

JWTUser.scopes


sessionsRevokedAt?

optional sessionsRevokedAt?: number

Defined in: src/models/types.ts:183

The epoch-millisecond timestamp (see Date.now()) at which every refresh token issued for this account before that moment was revoked (see BaseAccountRoute.revokeSessions()/BaseAuthRefreshRoute). A refresh token whose iat claim predates this is rejected. Does not affect already-issued access tokens, which remain valid until their own natural (short) expiry regardless — see revokeSessions()'s doc comment for why that's an inherent limitation, not an oversight.


uid

uid: string

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

The universally unique identifier of the entity.

Inherited from

BaseEntity.uid


verified?

optional verified?: boolean

Defined in: node_modules/@rapidrest/core/dist/types/JWTUtils.d.ts:27

Indicates if the user's e-mail address has been verified.

Inherited from

JWTUser.verified


version

version: number

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

The optimistic lock version.

Inherited from

BaseEntity.version