Provides factory functions to create authentication schemes for injecting bearer, basic, or API key credentials into HTTP requests.
// Source: https://github.com/context-plugins/plugin-marketplace | License: MIT | Copyright 2026- APIMatic
// Provided via justclaw.it.com; keep this notice with the code.
import type { AuthParams, AuthScheme, HttpMethod } from "../api-request.js";
import type { BasicAuthCredentials, TokenProvider } from "./credentials.js";
import type { RequestHeaders } from "../headers.js";
import type { RequestUrl } from "../url.js";
import type { HttpLogger } from "../http-logger.js";
import { AuthError, ConfigurationError, ConnectionError, TimeoutError } from "../errors.js";
const NO_PARAMS: AuthParams = { headers: [], query: [], cookies: [] };
export const noneAuth: AuthScheme = {
resolve: () => NO_PARAMS,
hasCredentials: () => false,
};
export function bearerAuth(token: TokenProvider | undefi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key