UNPKG

@zowe/cics-for-zowe-sdk

Version:
56 lines 1.78 kB
"use strict"; /** * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v20.html * * SPDX-License-Identifier: EPL-2.0 * * Copyright Contributors to the Zowe Project. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CICSSession = void 0; const imperative_1 = require("@zowe/imperative"); class CICSSession extends imperative_1.Session { cicsplexName; regionName; verified; constructor(profile) { const common = { protocol: profile.protocol, hostname: profile.host, port: Number(profile.port), rejectUnauthorized: profile.rejectUnauthorized, }; if (profile.certFile && profile.certKeyFile) { super({ ...common, type: imperative_1.SessConstants.AUTH_TYPE_CERT_PEM, storeCookie: false, cert: profile.certFile, certKey: profile.certKeyFile, }); } else { super({ ...common, type: imperative_1.SessConstants.AUTH_TYPE_TOKEN, tokenType: imperative_1.SessConstants.TOKEN_TYPE_LTPA, storeCookie: true, user: profile.user || "", password: profile.password || "", }); } this.cicsplexName = profile.cicsPlex; this.regionName = profile.regionName; } setVerified(v = true) { this.verified = v; } isVerified() { return this.verified; } } exports.CICSSession = CICSSession; //# sourceMappingURL=CICSSession.js.map