oidc-jwks-verify
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.
Scenario
- 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
Usage
let oidcValidator = issuer: `http://localhost:5000` // Somewhere in your codeoidcValidator
When building locally
Build Dependencies
Package: x509
- 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 error
available 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))
License
MIT (Enjoy)