@berlingske-media/bm.node-module.gateway_jwt
Version:
AuthGateway JWT verification library based on public JWKS endpoint
16 lines • 557 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.callbackSupport = void 0;
const node_util_1 = require("node:util");
const callbackSupport = (client) => {
const getSigningKey = client.getSigningKey.bind(client);
return (kid, cb) => {
if (cb) {
const callbackFunc = (0, node_util_1.callbackify)(getSigningKey);
return callbackFunc(kid, cb);
}
return getSigningKey(kid);
};
};
exports.callbackSupport = callbackSupport;
//# sourceMappingURL=callbackSupport.js.map