TeslaGov / ngx-http-auth-jwt-module

Secure your NGINX locations with JWT
MIT License
308 stars 118 forks source link

Support extraction of non-string claims #95

Open JoshMcCullough opened 1 year ago

JoshMcCullough commented 1 year ago

As indicated in the README:

Please note that number, boolean, array, and object claims are not supported at this time -- only string claims are supported. An error will be thrown if you attempt to extract a non-string claim.

We should support at least number and boolean claims. Supporting object and array claims is more difficult, but we should support extracting a claim from an array or object e.g. my_claim_array[0] or my_claim_obj[some_key][some_other_key].

sscotti commented 1 year ago

In regards to that, I take it that if a claim is a json_encoded string it at least won't throw an error ?

farzadam commented 1 year ago

extraction of claims is very easy using njs module, no matter if their type.