(self)
| 52 | jws.verify(token, "secret", ["HS256"]) |
| 53 | |
| 54 | def test_header_invalid_padding(self): |
| 55 | token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9A.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8" |
| 56 | with pytest.raises(JWSError): |
| 57 | jws.verify(token, "secret", ["HS256"]) |
| 58 | |
| 59 | def test_header_not_json(self): |
| 60 | token = "dGVzdA.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8" |