Initial commit

This commit is contained in:
talksik
2021-12-29 01:57:42 -08:00
commit ce39a60b42
4634 changed files with 997667 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
const jose = require('jose');
function retrieveSigningKeys(keys) {
const keystore = jose.JWKS.asKeyStore({ keys }, { ignoreErrors: true });
return keystore.all({ use: 'sig' }).map((key) => {
return {
kid: key.kid,
alg: key.alg,
get publicKey() { return key.toPEM(false); },
get rsaPublicKey() { return key.toPEM(false); },
getPublicKey() { return key.toPEM(false); }
};
});
}
module.exports = {
retrieveSigningKeys
};