lgrosz / mod_authn_jwt

A JWT authentication module for Lighttpd.
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Support boolean grants #6

Open lgrosz opened 3 months ago

lgrosz commented 3 months ago

Libjwt provides jwt_valid_add_grant_bool to add boolean grants. Unfortunately, lighttpd configuration syntax doesn't provide an unambiguous way to parse a boolean.

The current workaround to this is to just use integers as booleans (like the lighttpd configuration syntax suggests), or to use JSON claims (#5).

I don't see a way around this aside from refactoring the claims configuration into claims-<integer|string|boolean>.

lgrosz commented 3 months ago

Workaround tested in d44b1a1c325967456378a688ecf58db0998b6d09.

gstrauss commented 2 months ago

ISTM that using "json-claims" config is a reasonable and relatively straightforward solution.