Μετάβαση στο περιεχόμενο

IJobPrincipal

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

Defined in: packages/pipeline-job-context/src/interfaces/job-principal.interface.ts:13

Application port that reads the current principal when a job is enqueued and binds it again when the job runs. The application implements it over its own authentication state; register the implementation with registerJobContext.

TGrant = unknown

The application’s grant type, as declared in @AsSystem.

capture(): PrincipalReference | undefined

Defined in: packages/pipeline-job-context/src/interfaces/job-principal.interface.ts:18

The principal of the current execution, or undefined when there is none. Only id, type and sessionId of the result are kept.

PrincipalReference | undefined


restore<T>(principal, work, grants?): Promise<T>

Defined in: packages/pipeline-job-context/src/interfaces/job-principal.interface.ts:30

Re-checks principal against current state and runs work with it as the current principal. It runs inside the job’s tenant and correlation id. Throw to refuse the job, for example for a revoked session or a deleted principal; the job then fails without running.

T

PrincipalReference

() => Promise<T>

readonly TGrant[]

Set only for @AsSystem work: the complete grants its code declares. For a job payload it is undefined, and the principal’s authorization must be resolved from current state.

Promise<T>