NOTE THIS CLASS SHOULD NOT BE EXPORTED FOR PUBLIC CONSUMPTION.

This class is the fallback class when a credential manager fails to initialize. All methods in this class must throw te error passed in by the constructor.

### Hierarchy

- AbstractCredentialManager
  - InvalidCredentialManager

## Index

### Constructors

- constructor

### Properties

- causeError
- service

### Accessors

- name
- possibleSolutions

### Methods

- delete
- deleteCredentials
- initialize
- load
- loadCredentials
- save
- saveCredentials
- secureErrorDetails

## Constructors

### constructor

- new InvalidCredentialManager(service: string, causeError: Error): InvalidCredentialManager

- Overrides AbstractCredentialManager.constructor

  - Defined in @zowe/imperative/src/security/src/InvalidCredentialManager.ts:21

  Construct the credential manager object.

  #### Parameters

  - ##### service: string

    A service that needs to be passed to the superclass

  - ##### causeError: Error

    The load failure that has occurred

  #### Returns InvalidCredentialManager

## Properties

### Private Readonly causeError

causeError: Error

- Defined in @zowe/imperative/src/security/src/InvalidCredentialManager.ts:29

The load failure that has occurred

### Protected Readonly service

service: string

Overrides AbstractCredentialManager.service

- Defined in @zowe/imperative/src/security/src/InvalidCredentialManager.ts:28

A service that needs to be passed to the superclass

## Accessors

### name

- get name(): string

- Inherited from AbstractCredentialManager.name

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:78

  #### Returns string

  - the display name of this manager. Use in logging/messaging.

### Protected possibleSolutions

- get possibleSolutions(): string[] | undefined

- Inherited from AbstractCredentialManager.possibleSolutions

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:148

  #### Returns string[] | undefined

  - List of possible solutions for credential manager errors. Override this in your CredentialManager to supply more detailed error messages.

## Methods

### delete

- delete(account: string): Promise<void>

- Inherited from AbstractCredentialManager.delete

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:89

  Delete credentials for an account managed by the credential manager.

  #### Parameters

  - ##### account: string

    The account (or profile identifier) associated with credentials

  #### Returns Promise<void>

### Protected deleteCredentials

- deleteCredentials(_account: string): Promise<void>

- Overrides AbstractCredentialManager.deleteCredentials

  - Defined in @zowe/imperative/src/security/src/InvalidCredentialManager.ts:34

  #### Parameters

  - ##### _account: string

  #### Returns Promise<void>

### Optional initialize

- initialize(): Promise<void>

- Inherited from AbstractCredentialManager.initialize

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:42

  This is an optional method that your Credential Manager may choose to implement. If present, it will be called by the CredentialManagerFactory.initialize function to allow your manager to do more initialization after the class has become instantiated.

  Also, since asynchronous operations are not well handled in the constructor, this allows your Credential Manager to perform any asynchronous operations needed. Your initialize method just has to return the promise and we'll handle the rest.

  #### Returns Promise<void>

  A promise of the completion of your initialize function.

### load

- load(account: string, optional?: boolean): Promise<string>

- Inherited from AbstractCredentialManager.load

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:101

  Load credentials for an account managed by the credential manager.

  #### Parameters

  - ##### account: string

    The account (or profile identifier) associated with credentials

  - ##### Optional optional: boolean

    Set to true if failure to find credentials should be ignored

  #### Returns Promise<string>

  The username and password associated with the account.

### Protected loadCredentials

- loadCredentials(_account: string, _optional?: boolean): Promise<SecureCredential>

- Overrides AbstractCredentialManager.loadCredentials

  - Defined in @zowe/imperative/src/security/src/InvalidCredentialManager.ts:38

  #### Parameters

  - ##### _account: string

  - ##### Optional _optional: boolean

  #### Returns Promise<SecureCredential>

### save

- save(account: string, secureValue: string): Promise<void>

- Inherited from AbstractCredentialManager.save

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:121

  Save credentials for an account managed by the credential manager.

  throws

    ImperativeError - when the secure field is missing.

  #### Parameters

  - ##### account: string

    The account (or profile identifier) associated with credentials

  - ##### secureValue: string

    Value to be securely stored

  #### Returns Promise<void>

### Protected saveCredentials

- saveCredentials(_account: string, _credentials: SecureCredential): Promise<void>

- Overrides AbstractCredentialManager.saveCredentials

  - Defined in @zowe/imperative/src/security/src/InvalidCredentialManager.ts:42

  #### Parameters

  - ##### _account: string

  - ##### _credentials: SecureCredential

  #### Returns Promise<void>

### secureErrorDetails

- secureErrorDetails(): string | undefined

- Inherited from AbstractCredentialManager.secureErrorDetails

  - Defined in @zowe/imperative/src/security/src/abstract/AbstractCredentialManager.ts:137

  #### Returns string | undefined

  - Additional details for credential manager errors, if the current CredentialManager has provided any.

Generated using TypeDoc