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

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

type?

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

apiKey?

string | null

API key to include in request header

apiKeyHeader?

string | null

Header name for API key

bearerToken?

string | null

Bearer token for Authorization header

username?

string | null

Username for basic authentication

password?

string | null

Password for basic authentication

customHeaders?

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

Additional custom headers as JSON object

| undefined

Returns

Record<string, string>

Last updated on