/** * Apimatic APILib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { compositeAuthenticationProvider, customHeaderAuthenticationProvider, } from './authentication.js'; import { Configuration } from './configuration.js'; export function createAuthProviderFromConfig(config: Partial) { const authConfig = { authorization: config.customHeaderAuthenticationCredentials && customHeaderAuthenticationProvider( config.customHeaderAuthenticationCredentials ), }; return compositeAuthenticationProvider< keyof typeof authConfig, typeof authConfig >(authConfig); }