brew install openssl jansson libjwt
wget https://nginx.org/download/nginx-1.18.0.tar.gz
tar -zxvf nginx-1.18.0.tar.gz
git clone https://github.com/TeslaGov/ngx-http-auth-jwt-module
cd nginx-1.18.0/
brew link openssl # if running on Darwin, check for LDFLAGS and CPPFLAGS
./configure --add-module=../ngx-http-auth-jwt-module \
--with-http_ssl_module \
--with-http_v2_module \
--with-ld-opt="-L/usr/local/opt/openssl/lib" \
--with-cc-opt="-I/usr/local/opt/openssl/include"
make
Use jwks-to-pem.sh to extrat x509 public key.
I haven't had anytime to play with it so I'm still working towards a solution please update us if you find it.