This class provides access to the known set of credential manager overrides and functions to manipulate which credential manager is in use. Other credential managers can replace the default credential manager. Both CLI plugins and Zowe Explorer extensions can override the default credential manager. However, only one credential manager will be in effect on a given computer. The last component to override the credential manager wins.

### Hierarchy

- CredentialManagerOverride

## Index

### Properties

- CRED_MGR_SETTING_NAME
- DEFAULT_CRED_MGR_NAME
- KNOWN_CRED_MGRS

### Methods

- getCredMgrInfoByDisplayName
- getCredMgrInfoByPlugin
- getCredMgrInfoByZEExt
- getCurrentCredMgr
- getKnownCredMgrs
- getSettingsFileJson
- recordCredMgrInConfig
- recordDefaultCredMgrInConfig

## Properties

### Static Readonly CRED_MGR_SETTING_NAME

CRED_MGR_SETTING_NAME: string = "CredentialManager"

- Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:32

### Static Readonly DEFAULT_CRED_MGR_NAME

DEFAULT_CRED_MGR_NAME: string = "@zowe/cli"

- Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:33

### Static Private Readonly KNOWN_CRED_MGRS

KNOWN_CRED_MGRS: ICredentialManagerNameMap[] = [{"credMgrDisplayName": this.DEFAULT_CRED_MGR_NAME},{"credMgrDisplayName": "Secrets for Kubernetes","credMgrPluginName": "@zowe/secrets-for-kubernetes-for-zowe-cli","credMgrZEName": "Zowe.secrets-for-kubernetes"},{"credMgrDisplayName": false},]

- Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:35

## Methods

### Static getCredMgrInfoByDisplayName

- getCredMgrInfoByDisplayName(credMgrDisplayName: string | false): ICredentialManagerNameMap | null

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:59

  Get the credential manager information for the specified credential manager display name.

  #### Parameters

  - ##### credMgrDisplayName: string | false

    display name of the credential manager

  #### Returns ICredentialManagerNameMap | null

  An ICredentialManagerNameMap or null if the specified plugin is not a known credential manager.

### Static getCredMgrInfoByPlugin

- getCredMgrInfoByPlugin(pluginName: string): ICredentialManagerNameMap | null

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:72

  Get the credential manager information for the specified plugin.

  #### Parameters

  - ##### pluginName: string

    Name of the plugin package

  #### Returns ICredentialManagerNameMap | null

  An ICredentialManagerNameMap or null if the specified plugin is not a known credential manager.

### Static getCredMgrInfoByZEExt

- getCredMgrInfoByZEExt(ZEExtName: string): ICredentialManagerNameMap | null

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:85

  Get the credential manager information for the specified plugin.

  #### Parameters

  - ##### ZEExtName: string

    Name of the Zowe Explorer extension

  #### Returns ICredentialManagerNameMap | null

  An ICredentialManagerNameMap or null if the specified extension is not a known credential manager.

### Static getCurrentCredMgr

- getCurrentCredMgr(): string | false

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:105

  Get the active credential manager.

  #### Returns string | false

  Information about the current redential managers or false if none is set.

### Static getKnownCredMgrs

- getKnownCredMgrs(): ICredentialManagerNameMap[]

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:95

  Get the known credential managers.

  #### Returns ICredentialManagerNameMap[]

  An array of credential managers.

### Static Private getSettingsFileJson

- getSettingsFileJson(): { fileName: string; json: ISettingsFile }

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:230

  Get the contents of the $ZOWE_CLI_HOME/settings/imperative.json file. The resulting JSON is guaranteed to contain the key 'overrides.CredentialManager'.

  throws

    An ImperativeError if the file does not exist or have the key.

  #### Returns { fileName: string; json: ISettingsFile }

  A 'settings' object with the properties: fileName and json. The json object contains the contents of the settings file.

  - ##### fileName: string

  - ##### json: ISettingsFile

### Static recordCredMgrInConfig

- recordCredMgrInConfig(newCredMgrName: string | false): void

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:124

  Record the specified credential manager in the configuration of overrides. A plugin or ZE extension that provides a credential manager would record its credential manager name upon installation.

  throws

    An ImperativeError upon error.

  #### Parameters

  - ##### newCredMgrName: string | false

           The display name of your credential manager.

  #### Returns void

### Static recordDefaultCredMgrInConfig

- recordDefaultCredMgrInConfig(credMgrToReplace: string | false): void

- - Defined in @zowe/imperative/src/security/src/CredentialManagerOverride.ts:181

  Record the default Zowe CLI credential manager in the configuration of overrides. The specified credential manager will be replaced with the default Zowe CLI credential manager. A plugin or ZE extension that provides a credential manager would replace itself with the default credential manager when it is being uninstalled.

  throws

    An ImperativeError upon error.

  #### Parameters

  - ##### credMgrToReplace: string | false

           The display name of your credential manager. This name must also
           be the credential manager currently recorded in the configuration
           of overrides. Otherwise, no replacement will be performed.
           Specifying your own name is intended to prevent a plugin from
           inadvertently replacing another plugin's credential manager.

  #### Returns void

Generated using TypeDoc