Skip to main content

Class: DefaultAccountsMongo

Defined in: auth/src/jobs/mongo/DefaultAccountsMongo.ts:8

The DefaultAccounts is a single-execution background job that runs at service startup which creates default user accounts for the system (e.g. the admin account). The default accounts to create are defined in the server's config.ts under the key default_accounts.

Extends​

Constructors​

Constructor​

new DefaultAccountsMongo(): DefaultAccountsMongo

Returns​

DefaultAccountsMongo

Inherited from​

DefaultAccounts.constructor

Properties​

aliasClass​

protected aliasClass: any = AliasMongo

Defined in: auth/src/jobs/mongo/DefaultAccountsMongo.ts:9

Overrides​

DefaultAccounts.aliasClass


aliasRepo?​

protected optional aliasRepo?: RepoUtils<AliasMongo>

Defined in: auth/src/jobs/DefaultAccounts.ts:45

Inherited from​

DefaultAccounts.aliasRepo


defaultAccounts​

protected defaultAccounts: DefaultAccountConfig[] = []

Defined in: auth/src/jobs/DefaultAccounts.ts:53

Inherited from​

DefaultAccounts.defaultAccounts


defaultScopes​

protected defaultScopes: string[] = []

Defined in: auth/src/jobs/DefaultAccounts.ts:56

Inherited from​

DefaultAccounts.defaultScopes


logger?​

protected optional logger?: any

Defined in: auth/src/jobs/DefaultAccounts.ts:59

Inherited from​

DefaultAccounts.logger


passwordConfig​

protected passwordConfig: PasswordConfig

Defined in: auth/src/jobs/DefaultAccounts.ts:62

Inherited from​

DefaultAccounts.passwordConfig


passwordFile?​

protected optional passwordFile?: string = "passwords"

Defined in: auth/src/jobs/DefaultAccounts.ts:65

Inherited from​

DefaultAccounts.passwordFile


profileClass​

protected profileClass: any = ProfileMongo

Defined in: auth/src/jobs/mongo/DefaultAccountsMongo.ts:10

Overrides​

DefaultAccounts.profileClass


profileRepo?​

protected optional profileRepo?: RepoUtils<ProfileMongo>

Defined in: auth/src/jobs/DefaultAccounts.ts:67

Inherited from​

DefaultAccounts.profileRepo


secretClass​

protected secretClass: any = SecretMongo

Defined in: auth/src/jobs/mongo/DefaultAccountsMongo.ts:11

Overrides​

DefaultAccounts.secretClass


secretRepo?​

protected optional secretRepo?: RepoUtils<SecretMongo>

Defined in: auth/src/jobs/DefaultAccounts.ts:69

Inherited from​

DefaultAccounts.secretRepo


trustedRoles​

protected trustedRoles: string[]

Defined in: auth/src/jobs/DefaultAccounts.ts:72

Inherited from​

DefaultAccounts.trustedRoles


userClass​

protected userClass: any = UserMongo

Defined in: auth/src/jobs/mongo/DefaultAccountsMongo.ts:12

Overrides​

DefaultAccounts.userClass


userRepo?​

protected optional userRepo?: RepoUtils<UserMongo>

Defined in: auth/src/jobs/DefaultAccounts.ts:74

Inherited from​

DefaultAccounts.userRepo

Accessors​

schedule​

Get Signature​

get schedule(): string | undefined

Defined in: auth/src/jobs/DefaultAccounts.ts:120

Returns the desired execution interval that this service should be scheduled with. If undefined is returned the service is executed only once.

Returns​

string | undefined

Inherited from​

DefaultAccounts.schedule

Methods​

init()​

init(): Promise<void>

Defined in: auth/src/jobs/DefaultAccounts.ts:77

Returns​

Promise<void>

Inherited from​

DefaultAccounts.init


run()​

run(): void | Promise<void>

Defined in: auth/src/jobs/DefaultAccounts.ts:124

The processing function to execute at each scheduled interval.

Returns​

void | Promise<void>

Inherited from​

DefaultAccounts.run


start()​

start(): Promise<void>

Defined in: auth/src/jobs/DefaultAccounts.ts:128

Initializes the background service with any defaults.

Returns​

Promise<void>

Inherited from​

DefaultAccounts.start


stop()​

stop(): void | Promise<void>

Defined in: auth/src/jobs/DefaultAccounts.ts:181

Shuts down the background allowing the service to complete any outstanding tasks.

Returns​

void | Promise<void>

Inherited from​

DefaultAccounts.stop