Skip to main content

Class: AuthorizationCodeMongo

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

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

Extends​

  • BaseMongoEntity

Implements​

Constructors​

Constructor​

new AuthorizationCodeMongo(other?): AuthorizationCodeMongo

Defined in: auth/src/models/mongo/AuthorizationCodeMongo.ts:82

Parameters​

other?​

Partial<AuthorizationCodeMongo>

Returns​

AuthorizationCodeMongo

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/AuthorizationCodeMongo.ts:52

The uid of the Client this code was issued to.

Implementation of​

AuthorizationCode.clientId


codeChallenge?​

optional codeChallenge?: string

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

The RFC 7636 PKCE code challenge, if the client used PKCE.

Implementation of​

AuthorizationCode.codeChallenge


codeChallengeMethod?​

optional codeChallengeMethod?: "S256" | "plain"

Defined in: auth/src/models/mongo/AuthorizationCodeMongo.ts:70

The method used to derive codeChallenge from the client's code_verifier.

Implementation of​

AuthorizationCode.codeChallengeMethod


codeHash​

codeHash: string = ""

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

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

Implementation of​

AuthorizationCode.codeHash


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​

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

AuthorizationCode.dateModified

Inherited from​

BaseMongoEntity.dateModified


expiresAt​

expiresAt: Date

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

When this code expires — typically ~60 seconds after issuance.

Implementation of​

AuthorizationCode.expiresAt


nonce?​

optional nonce?: string

Defined in: auth/src/models/mongo/AuthorizationCodeMongo.ts:74

The OIDC nonce to carry into the id_token, if the client requested the openid scope.

Implementation of​

AuthorizationCode.nonce


redirectUri​

redirectUri: string = ""

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

The exact redirect_uri presented at /authorize — must match exactly again at /token.

Implementation of​

AuthorizationCode.redirectUri


scope​

scope: string = ""

Defined in: auth/src/models/mongo/AuthorizationCodeMongo.ts:62

The space-delimited set of scopes granted.

Implementation of​

AuthorizationCode.scope


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​

AuthorizationCode.uid

Inherited from​

BaseMongoEntity.uid


used​

used: boolean = false

Defined in: auth/src/models/mongo/AuthorizationCodeMongo.ts:80

Set to true once this code has been redeemed at /token. A second presentation of an already-used code is treated as a replay/leak: see BaseOAuthTokenRoute.

Implementation of​

AuthorizationCode.used


userUid​

userUid: string = ""

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

The uid of the User (resource owner) who authorized this code.

Implementation of​

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

AuthorizationCode.version

Inherited from​

BaseMongoEntity.version