This class is used by the auth command handlers as the base class for their implementation.

### Hierarchy

- AbstractAuthHandler
  - BaseAuthHandler

### Implements

- ICommandHandler

## Index

### Properties

- mDefaultTokenType
- mProfileType
- mServiceDescription

### Methods

- createSessCfgFromArgs
- getAuthHandlerApi
- process
- processLogin
- processLogout

## Properties

### Protected Abstract mDefaultTokenType

mDefaultTokenType: SessConstants.TOKEN_TYPE_CHOICES

- Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:30

The default token type to use if not specified as a command line option

### Protected Abstract mProfileType

mProfileType: string

- Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:25

The profile type where token type and value should be stored

### Protected Optional mServiceDescription

mServiceDescription: string

- Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:35

The description of your service to be used in CLI prompt messages

## Methods

### Protected Abstract createSessCfgFromArgs

- createSessCfgFromArgs(args: ICommandArguments): ISession

- - Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:77

  This is called by the {@link AbstractAuthHandler#process} when it needs a session. Should be used to create a session to connect to the auth service.

  abstract

  #### Parameters

  - ##### args: ICommandArguments

    The command line arguments to use for building the session

  #### Returns ISession

  The session object built from the command line arguments.

### Abstract getAuthHandlerApi

- getAuthHandlerApi(): IAuthHandlerApi

- - Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:67

  Returns auth handler API that provides convenient functions to create a session from args, and use it to login or logout of an auth service.

  #### Returns IAuthHandlerApi

### process

- process(commandParameters: IHandlerParameters): Promise<void>

- Implementation of ICommandHandler.process

  - Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:46

  This handler is used for both "auth login" and "auth logout" commands. It determines the correct action to take and calls either `processLogin` or `processLogout` accordingly.

  #### Parameters

  - ##### commandParameters: IHandlerParameters

    Command parameters sent by imperative.

  #### Returns Promise<void>

### Protected Abstract processLogin

- processLogin(commandParameters: IHandlerParameters): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:84

  Performs the login operation and stores the new token in the profile.

  abstract

  #### Parameters

  - ##### commandParameters: IHandlerParameters

  #### Returns Promise<void>

### Protected Abstract processLogout

- processLogout(commandParameters: IHandlerParameters): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/auth/handlers/AbstractAuthHandler.ts:91

  Performs the logout operation and deletes the old token from the profile.

  abstract

  #### Parameters

  - ##### commandParameters: IHandlerParameters

  #### Returns Promise<void>

Generated using TypeDoc