Creates a new instance of credentials resolver.
(optional) component configuration parameters
(optional) component references
Adds a new credential to component credentials
new credential parameters to be added
Configures component by passing configuration parameters.
configuration parameters to be set.
Gets all credentials configured in component configuration.
Redirect to CredentialStores is not done at this point. If you need fully fleshed credential use lookup method instead.
a list with credential parameters
Looks up component credential parameters. If credentials are configured to be retrieved from Credential store it finds a ICredentialStore and lookups credentials there.
(optional) transaction id to trace execution through call chain.
callback function that receives resolved credential or error.
Sets references to dependent components.
references to locate the component dependencies.
Generated using TypeDoc
Helper class to retrieve component credentials.
If credentials are configured to be retrieved from ICredentialStore, it automatically locates ICredentialStore in component references and retrieve credentials from there using store_key parameter.
Configuration parameters
credential:
credentials: alternative to credential
References
*:credential-store:*:*:1.0
(optional) Credential stores to resolve credentialsCredentialParams
ICredentialStore
Example
let config = ConfigParams.fromTuples( "credential.user", "jdoe", "credential.pass", "pass123" ); let credentialResolver = new CredentialResolver(); credentialResolver.configure(config); credentialResolver.setReferences(references); credentialResolver.lookup("123", (err, credential) => { // Now use credential... });