Abstract Class: DefaultAccounts<U, A, P, S>
Defined in: src/jobs/DefaultAccounts.ts:31
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
BackgroundService
Extended by
Type Parameters
U
U extends User
A
A extends Alias
P
P extends Profile
S
S extends Secret
Constructors
Constructor
new DefaultAccounts<
U,A,P,S>():DefaultAccounts<U,A,P,S>
Returns
DefaultAccounts<U, A, P, S>
Inherited from
BackgroundService.constructor
Properties
aliasClass
abstractprotectedaliasClass:any
Defined in: src/jobs/DefaultAccounts.ts:37
aliasRepo?
protectedoptionalaliasRepo?:RepoUtils<A>
Defined in: src/jobs/DefaultAccounts.ts:45
defaultAccounts
protecteddefaultAccounts:DefaultAccountConfig[] =[]
Defined in: src/jobs/DefaultAccounts.ts:53
defaultScopes
protecteddefaultScopes:string[] =[]
Defined in: src/jobs/DefaultAccounts.ts:56
logger?
protectedoptionallogger?:any
Defined in: src/jobs/DefaultAccounts.ts:59
passwordConfig
protectedpasswordConfig:PasswordConfig
Defined in: src/jobs/DefaultAccounts.ts:62
passwordFile?
protectedoptionalpasswordFile?:string="passwords"
Defined in: src/jobs/DefaultAccounts.ts:65
profileClass
abstractprotectedprofileClass:any
Defined in: src/jobs/DefaultAccounts.ts:38
profileRepo?
protectedoptionalprofileRepo?:RepoUtils<P>
Defined in: src/jobs/DefaultAccounts.ts:67
secretClass
abstractprotectedsecretClass:any
Defined in: src/jobs/DefaultAccounts.ts:39
secretRepo?
protectedoptionalsecretRepo?:RepoUtils<S>
Defined in: src/jobs/DefaultAccounts.ts:69
trustedRoles
protectedtrustedRoles:string[]
Defined in: src/jobs/DefaultAccounts.ts:72
userClass
abstractprotecteduserClass:any
Defined in: src/jobs/DefaultAccounts.ts:40
userRepo?
protectedoptionaluserRepo?:RepoUtils<U>
Defined in: src/jobs/DefaultAccounts.ts:74
Accessors
schedule
Get Signature
get schedule():
string|undefined
Defined in: 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
Overrides
BackgroundService.schedule
Methods
init()
init():
Promise<void>
Defined in: src/jobs/DefaultAccounts.ts:77
Returns
Promise<void>
run()
run():
void|Promise<void>
Defined in: src/jobs/DefaultAccounts.ts:124
The processing function to execute at each scheduled interval.
Returns
void | Promise<void>
Overrides
BackgroundService.run
start()
start():
Promise<void>
Defined in: src/jobs/DefaultAccounts.ts:128
Initializes the background service with any defaults.
Returns
Promise<void>
Overrides
BackgroundService.start
stop()
stop():
void|Promise<void>
Defined in: src/jobs/DefaultAccounts.ts:181
Shuts down the background allowing the service to complete any outstanding tasks.
Returns
void | Promise<void>
Overrides
BackgroundService.stop