Base interface for provider credentials.
Each provider extends this with their specific credential fields.
Remarks
TEMPORARY INTERFACE: This interface is an interim solution for the 2.x patch release.
In a future release, this will be replaced by a more comprehensive credential management
system with database storage, encryption, and multi-tenancy support. The replacement
interface will be located in @memberjunction/credentials or @memberjunction/core.
This interface is designed to be forward-compatible with the 3.0 CredentialResolutionOptions
system. When migrating to 3.0, credential objects passed using this interface will work
with the new system's directValues parameter.
See
plans/3_0_credentials_design.md for the full 3.0 credential system design
Example
// Provider-specific credentials extend this base interfaceSendGridCredentialsextendsProviderCredentialsBase { apiKey?: string; }
// Usage with fallback enabled (default) awaitprovider.SendSingleMessage(message, { apiKey:'SG.xxx' });
// Usage with fallback disabled awaitprovider.SendSingleMessage(message, { apiKey:'SG.xxx', disableEnvironmentFallback:true });
When true, environment variable fallback is DISABLED for this request.
If credentials are incomplete and this is true, the request will fail
rather than falling back to environment variables.
Default
false (fallbackenabledforbackwardcompatibility)
Example
// With fallback (default) - uses env var if apiKey not provided awaitprovider.SendSingleMessage(message, {});
// Without fallback - fails if apiKey not provided awaitprovider.SendSingleMessage(message, { disableEnvironmentFallback:true });
Base interface for provider credentials. Each provider extends this with their specific credential fields.
Remarks
TEMPORARY INTERFACE: This interface is an interim solution for the 2.x patch release. In a future release, this will be replaced by a more comprehensive credential management system with database storage, encryption, and multi-tenancy support. The replacement interface will be located in
@memberjunction/credentialsor@memberjunction/core.This interface is designed to be forward-compatible with the 3.0
CredentialResolutionOptionssystem. When migrating to 3.0, credential objects passed using this interface will work with the new system'sdirectValuesparameter.See
plans/3_0_credentials_design.md for the full 3.0 credential system design
Example