UNPKG

@adobe/pdfservices-node-sdk

Version:

The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.

32 lines 1.47 kB
"use strict"; /* * Copyright 2024 Adobe * All Rights Reserved. * * NOTICE: Adobe permits you to use, modify, and distribute this file in * accordance with the terms of the Adobe license agreement accompanying * it. If you have received this file from a source other than Adobe, * then your use, modification, or distribution of it requires the prior * written permission of Adobe. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthenticatorFactory = void 0; const ServicePrincipalCredentials_1 = require("../../auth/ServicePrincipalCredentials"); const ServicePrincipalAuthenticator_1 = require("./ServicePrincipalAuthenticator"); const TokenCredentials_1 = require("./TokenCredentials"); const TokenAuthenticator_1 = require("./TokenAuthenticator"); class AuthenticatorFactory { static getAuthenticator(credentials, clientConfig) { if (credentials instanceof ServicePrincipalCredentials_1.ServicePrincipalCredentials) { return new ServicePrincipalAuthenticator_1.ServicePrincipalAuthenticator(credentials, clientConfig); } else if (credentials instanceof TokenCredentials_1.TokenCredentials) { return new TokenAuthenticator_1.TokenAuthenticator(credentials); } else { throw new TypeError("Invalid Credentials provided as argument"); } } } exports.AuthenticatorFactory = AuthenticatorFactory; //# sourceMappingURL=AuthenticatorFactory.js.map