Code inspired from express-oidc-jwks-verify. The reason why this project exists was for my project that needed to connect and validate the JWT token without using the express library.
- Server is having a Validation Key to validate the user tokens (AddValidationKey in IdentityServer)
- The client want to validate the token against the server (basically a key check)
- We validate the id_token and then consider the user really authenticated
Installation [Not yet deployed as a npm package]
The installation is simple:
npm install oidc-jwks-verify
let oidcValidator = issuer: ``// Somewhere in your codeoidcValidator
When building locally
- node-gyp (python... https://github.com/nodejs/node-gyp if not already installed)
- msbuild 14 (vs 2015?... https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159 if not already installed)
- openSSL (Otherwise an error...
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\...\oidc-jwks-verify\node_modules\x509\build\x509.vcxproj] gyp ERR! build erroravailable at https://slproweb.com/products/Win32OpenSSL.html and https://github.com/ethereumjs/ethereumjs-util/issues/43 (see for the libeay32.lib link at the end))