@hubspot/api-client
Version:
NodeJS v3 [HubSpot API](https://developers.hubspot.com/docs/api/overview) SDK(Client) files
24 lines • 646 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Auth = void 0;
const AuthTypes_1 = require("./AuthTypes");
class Auth {
static chooseAuth(opts = {}, config = {}) {
let type;
if (opts.authType) {
if (opts.authType !== 'none' && opts.authType in config) {
type = opts.authType;
}
}
else {
for (const key in AuthTypes_1.AuthTypes) {
if (config[key]) {
type = key;
}
}
}
return type;
}
}
exports.Auth = Auth;
//# sourceMappingURL=Auth.js.map