Class to manage automatic storage of properties in team config.

### Hierarchy

- ConfigAutoStore

## Index

### Methods

- _fetchTokenForSessCfg
- _findActiveProfile
- _findAuthHandlerForProfile
- _storeSessCfgProps
- fetchTokenForSessCfg
- findActiveProfile
- findAuthHandlerForProfile
- storeSessCfgProps

## Methods

### Static Private _fetchTokenForSessCfg

- _fetchTokenForSessCfg(opts: IConfigAutoStoreStoreSessCfgPropsOpts): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:230

  Helper function that retrieves token value that will be auto-stored into session config

  #### Parameters

  - ##### opts: IConfigAutoStoreStoreSessCfgPropsOpts

    Set of options required to fetch the token value to be auto-stored

  #### Returns Promise<boolean>

  True if auth handler was found and token was fetched

### Static Private _findActiveProfile

- _findActiveProfile(opts: IConfigAutoStoreFindActiveProfileOpts): [string, string] | undefined

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:47

  Helper method to find an active profile based on the optional CLI handler parameters

  #### Parameters

  - ##### opts: IConfigAutoStoreFindActiveProfileOpts

    Set of options required to find an active profile

  #### Returns [string, string] | undefined

  Tuple containing profile type and name, or undefined if no profile was found

### Static Private _findAuthHandlerForProfile

- _findAuthHandlerForProfile(opts: IConfigAutoStoreFindAuthHandlerForProfileOpts): AbstractAuthHandler | undefined

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:76

  Helper method that finds the token auth handler class for a team config profile

  #### Parameters

  - ##### opts: IConfigAutoStoreFindAuthHandlerForProfileOpts

    Set of options required to find the auth handler for a given profile path

  #### Returns AbstractAuthHandler | undefined

  Auth handler class or undefined if none was found

### Static _storeSessCfgProps

- _storeSessCfgProps(opts: IConfigAutoStoreStoreSessCfgPropsOpts): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:131

  Stores session config properties into a team config profile.

  #### Parameters

  - ##### opts: IConfigAutoStoreStoreSessCfgPropsOpts

    Set of options required to store session config properties

  #### Returns Promise<void>

### Static Private fetchTokenForSessCfg

- fetchTokenForSessCfg(params: IHandlerParameters, sessCfg: {}, profilePath: string): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:221

  Retrieves token value that will be auto-stored into session config.

  #### Parameters

  - ##### params: IHandlerParameters

    CLI handler parameters object

  - ##### sessCfg: {}

    Session config with credentials for basic or cert auth

    - ##### [key: string]: any

  - ##### profilePath: string

    JSON path of profile containing tokenType

  #### Returns Promise<boolean>

  True if auth handler was found and token was fetched

### Static findActiveProfile

- findActiveProfile(params: IHandlerParameters, profileProps: string[]): [string, string] | undefined

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:39

  Finds the profile where auto-store properties should be saved.

  #### Parameters

  - ##### params: IHandlerParameters

    CLI handler parameters object

  - ##### profileProps: string[]

    List of properties required in the profile schema

  #### Returns [string, string] | undefined

  Tuple containing profile type and name, or undefined if no profile was found

### Static findAuthHandlerForProfile

- findAuthHandlerForProfile(profilePath: string, cmdArguments: ICommandArguments): AbstractAuthHandler | undefined

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:67

  Finds the token auth handler class for a team config profile.

  #### Parameters

  - ##### profilePath: string

    JSON path of profile

  - ##### cmdArguments: ICommandArguments

    CLI arguments which may specify a profile

  #### Returns AbstractAuthHandler | undefined

  Auth handler class or undefined if none was found

### Static storeSessCfgProps

- storeSessCfgProps(params: IHandlerParameters, sessCfg: {}, propsToStore: string[]): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ConfigAutoStore.ts:123

  Stores session config properties into a team config profile.

  #### Parameters

  - ##### params: IHandlerParameters

    CLI handler parameters object

  - ##### sessCfg: {}

    Session config containing properties to store

    - ##### [key: string]: any

  - ##### propsToStore: string[]

    Names of properties that should be stored

  #### Returns Promise<void>

Generated using TypeDoc