haproxy-lua-oauth
haproxy-lua-oauth copied to clipboard
Allow using multiple keys and selecting between them via kid
JWT contains a mechanism for selecting the correct key by using an identifier. This commit adds an ability to use a different key based on the parameter in the JWT to verify.
To make sure that the change doesn't introduce any issues a new test script was added to run some sanity tests.
maybe better added (didn't check whether it's already there) in the mainline/integrated C JWT code:
https://github.com/haproxy/haproxy/blob/master/src/jwt.c