Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(registry): support not-empty validation
authlib fails if essential claim is empty, new implementation may choose to accept empty strings. in most cases empty value should not be accepted, it is handy to be able to these. raise InvalidClaimError when not_empty=True claim option: def test_essential_empty_value(self): claims_requests = jwt.JWTClaimsRegistry(sub={"essential": True, "not_empty": True}) self.assertRaises(InvalidClaimError, claims_requests.validate, {"sub": ""}) Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
- Loading branch information