initial commit
This commit is contained in:
16
server/node_modules/jwks-rsa/src/wrappers/callbackSupport.js
generated
vendored
Normal file
16
server/node_modules/jwks-rsa/src/wrappers/callbackSupport.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
const { callbackify } = require('util');
|
||||
|
||||
const callbackSupport = (client) => {
|
||||
const getSigningKey = client.getSigningKey.bind(client);
|
||||
|
||||
return (kid, cb) => {
|
||||
if (cb) {
|
||||
const callbackFunc = callbackify(getSigningKey);
|
||||
return callbackFunc(kid, cb);
|
||||
}
|
||||
|
||||
return getSigningKey(kid);
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.default = callbackSupport;
|
||||
Reference in New Issue
Block a user