UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

24 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class AuthHandler { path = require("path"); async attachAuthHandling() { const authConfig = require("./authConfig.js"); if (browser.config.params && browser.config.params.auth) { const formType = browser.config.params.auth.formType; if (formType && formType !== "skip") { if (!authConfig[formType] || !authConfig[formType].name || !this.path.resolve(authConfig[formType].name)) { throw new Error(`Please provide a valid 'formType' instead of '${formType}'.`); } // eslint-disable-next-line no-console console.log(this.path.resolve(authConfig[formType].name)); const execAuthenticator = require(authConfig[formType].name); await execAuthenticator(); } } } ; } ; exports.default = new AuthHandler(); //# sourceMappingURL=authHandler.js.map