Sometimes it's required to return non 403 code but 401 instead, for example to enforce 2FA/MFA cases.
Currently it's impossible because on token / OPA error check the HTTP status code is hardcoded to 403.
Also it could be useful to make success status code OPA driven as well, i.e. extract it from configurable field of OPA response. So, OPA can force redirect to some resource for example.
WDYT ? I am read to attempt to provide a PR for this.
Hello
Sometimes it's required to return non 403 code but 401 instead, for example to enforce 2FA/MFA cases. Currently it's impossible because on token / OPA error check the HTTP status code is hardcoded to 403.
Also it could be useful to make success status code OPA driven as well, i.e. extract it from configurable field of OPA response. So, OPA can force redirect to some resource for example.
WDYT ? I am read to attempt to provide a PR for this.