
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
fi-credentials
Advanced tools
Simple JSON credentials loader for local and S3 sources.
npm install --save fi-credentials
const credentials = require('fi-credentials');
This module exports an Object that exposes the following Functions:
const credentials = require('fi-credentials');
credentials.load(config).then((creds) => {
console.log('Credentials loaded!', creds);
creds // All the credentials object.
credentials.get(); // All the credentials object.
creds.database; // Database property values only.
credentials.get('database'); // Database property values only.
})
.catch(err => {
throw err;
});
IMPORTANT: Your credential's file must be a valid JSON file.
It must be an Object with the following parameters:
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
source | String | No | undefined | Can be used specify 's3' as source. Anything else will be local by default. |
debug | Function|Boolean | No | Function | Can be a Function to log with or a Boolean. If true it will use console.log. |
s3 | Object | If source is 's3' | undefined | This is the get object params config for the AWS SDK S3 client. |
s3.bucket | String | If source is 's3' | undefined | The S3 bucket name from where to obtain the object. |
s3.key | String | If source is 's3' | undefined | The S3 bucket key name from where to obtain the credentials file. |
s3.apiVersion | String | If source is 's3' | undefined | The S3 API version to use. |
local | Object | If source is not 's3' | undefined | The local configuration object. |
local.path | String | If source is not 's3' | undefined | The local path to the credentials file. |
const config = {
source: 's3', // Or anything else for local.
debug: true, // Or you may use the debug module function.
s3: {
key: 'path/to/credentials.json',
apiVersion: '2006-03-01',
bucket: 'bucket-name'
},
local: {
path: '/local/path/to/credentials.json'
}
};
View the API docs here.
FAQs
Simple JSON credentials loader for local and S3 sources.
The npm package fi-credentials receives a total of 2 weekly downloads. As such, fi-credentials popularity was classified as not popular.
We found that fi-credentials demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.