I finally ended with creating a new method in openidc.lua, which apparently contains all necessary stuff to call jwt.lua. Not sure what’s missing from calling it directly from nginx.tmpl though.
CLICK HERE to find out more related problems solutions.