Closed penumbra23 closed 2 years ago
@fitzyjoe I've updated the code and refactored (a bit).
First idea was to have a static keyBin
variable to hold the key upon config merging. That was quite okay for one location, but as soon as I added two location with different keyfile, both locations were using the last one loaded...
Now the location config has a (kinda) private _auth_jwt_keyfile
field holding the key data and keysize for each specified location block. It's loaded on config merging and reused on each request to improve the performance a bit.
Hope it's okay now, leave more comments because we're using this plugin heavily!
auth_jwt_use_keyfile
andauth_jwt_keyfile_path
for loading the PEM encoded public key from file (defaults to"/app/pub_key"
)