import { ZosmfSession } from "@zowe/zosmf-for-zowe-sdk" ; import { BaseAuthHandler , AbstractSession , ICommandArguments , ISession , SessConstants } from "@zowe/imperative" ; import { Logout , Login } from "@zowe/core-for-zowe-sdk" ; /**
 * This class is used by the auth command handlers as the base class for their implementation.
 */ export default class ApimlAuthHandler extends BaseAuthHandler { /**
     * The profile type where token type and value should be stored
     */ protected mProfileType : string = "base" ; /**
     * The default token type to use if not specified as a command line option
     */ protected mDefaultTokenType : SessConstants . TOKEN_TYPE_CHOICES = SessConstants . TOKEN_TYPE_APIML ; /**
     * This is called by the  BaseAuthHandler when it needs a
     * session. Should be used to create a session to connect to the auth
     * service.
     *  param { ICommandArguments } args returns { ISession } protected createSessCfgFromArgs : ( args : ICommandArguments ) => ISession = ZosmfSession . createSessCfgFromArgs ; param { AbstractSession } session returns { Promise < string > } protected async doLogin ( session ) { return Login . apimlLogin ( session ) ; } param { AbstractSession } session protected async doLogout ( session ) { return Logout . apimlLogout ( session ) ; } }