auth0
Version:
Auth0 Node.js SDK for the Management API v2.
17 lines (16 loc) • 912 B
JavaScript
// This file was auto-generated by Fern from our API Definition.
import { BearerAuthProvider } from "./auth/BearerAuthProvider.mjs";
import * as core from "./core/index.mjs";
export function normalizeClientOptions(options) {
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging) });
}
export function normalizeClientOptionsWithAuth(options) {
var _a;
const normalized = normalizeClientOptions(options);
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = new BearerAuthProvider(normalizedWithNoOpAuthProvider));
return normalized;
}
function withNoOpAuthProvider(options) {
return Object.assign(Object.assign({}, options), { authProvider: new core.NoOpAuthProvider() });
}