Skip to content

createJobTriggerAuthenticator — @gj-kit/nest-operations-jobs

A public function from @gj-kit/nest-operations-jobs/core. The signature below is taken directly from the 0.1.1 release declaration.

import { createJobTriggerAuthenticator } from '@gj-kit/nest-operations-jobs/core';
/**
* Build the authenticator the guard delegates to.
*
* Order: read the bearer token, compare it against the shared secret in constant
* time, and only when the token structurally looks like a JWS hand it to the
* verifier. Every rejection raises `ERR_JOB_UNAUTHORIZED` with one fixed message.
*
* Throws `ERR_JOB_AUTH_MISCONFIGURED` when neither a secret nor a verifier is
* supplied — an unauthenticated job trigger is never a valid configuration, and
* this fails at wiring time rather than on the scheduler's first call.
*/
declare function createJobTriggerAuthenticator(options: JobTriggerAuthOptions): (header: string | readonly string[] | null | undefined) => Promise<JobTriggerIdentity>;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/nest-operations-jobs
  • Version: 0.1.1
  • Public entry: ./core
  • Source: GitHub