Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/jobs/handlers/url-fetch-job/auth

lib/jobs/handlers/url-fetch-job/auth

Authentication utilities for URL fetch jobs.

Handles building HTTP headers for various authentication methods including API keys, bearer tokens, basic auth, and custom headers.

Functions

buildAuthHeaders()

buildAuthHeaders(authConfig): Record<string, string>

Builds HTTP headers based on authentication configuration.

Parameters

authConfig

undefined |

{ type?: null | "none" | "api-key" | "bearer" | "basic"; apiKey?: null | string; apiKeyHeader?: null | string; bearerToken?: null | string; username?: null | string; password?: null | string; customHeaders?: null | string | number | boolean | unknown[] | {[k: string]: unknown; }; }

type?

null | "none" | "api-key" | "bearer" | "basic"

apiKey?

null | string

API key to include in request header

apiKeyHeader?

null | string

Header name for API key

bearerToken?

null | string

Bearer token for Authorization header

username?

null | string

Username for basic authentication

password?

null | string

Password for basic authentication

customHeaders?

null | string | number | boolean | unknown[] | {[k: string]: unknown; }

Additional custom headers as JSON object

Returns

Record<string, string>

Last updated on