From 52931fdc9822dc207a21d7124101cb3d93f337f6 Mon Sep 17 00:00:00 2001 From: Maxime Lecoq Date: Wed, 14 Jul 2021 22:39:01 +0200 Subject: [PATCH] Public key type removed The type of the public key should now be put inside the key itself. --- dfc-app/src/server/auth/middlware-express-oidc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dfc-app/src/server/auth/middlware-express-oidc.js b/dfc-app/src/server/auth/middlware-express-oidc.js index 1fee3ea..accd94b 100644 --- a/dfc-app/src/server/auth/middlware-express-oidc.js +++ b/dfc-app/src/server/auth/middlware-express-oidc.js @@ -24,7 +24,7 @@ async function middlware_express_oidc (req,res,next) { try { // console.log('token',token); - let publicKey="-----BEGIN PUBLIC KEY-----"+config.OIDC.lesCommuns.public_key+"-----END PUBLIC KEY-----" + let publicKey=config.OIDC.lesCommuns.public_key; // should include key type (BEGIN...) // console.log('publicKey', publicKey); const key = await jose.JWK.asKey(publicKey, 'pem'); const verifier = jose.JWS.createVerify(key);