jwt-kms
jwt-kms copied to clipboard
Option to pass in AWS constant
Hey, thanks for the lib!
I'm using the AWS X-Ray client and I believe I need to be able to wrap the initialization of AWS inside a function like so:
var AWS = captureAWS(require('aws-sdk'));
I'm not sure if I can accomplish that since the lib defines AWS on its own.
Thoughts?
@andrhamm Thanks for the suggestion. How about a config param called AWSXRay that you pass the library to. e.g.
var jwtkms = new JWTKMS({
aws: {
region: "us-east-1",
accessKeyId : process.env.AWS_ACCESS_KEY, // Optional if set in environment
secretAccessKey: process.env.AWS_SECRET_KEY // Optional if set in environment
},
AWSXRay: require('aws-xray-sdk')
});