()
| 358 | |
| 359 | |
| 360 | def test_validate_custom(): |
| 361 | id_token = jwt.encode({"alg": "HS256"}, {"custom": "foo"}, "k") |
| 362 | claims_options = {"custom": {"validate": lambda c, o: o == "bar"}} |
| 363 | claims = jwt.decode(id_token, "k", claims_options=claims_options) |
| 364 | with pytest.raises(errors.InvalidClaimError): |
| 365 | claims.validate() |
| 366 | |
| 367 | |
| 368 | def test_use_jws(): |