def test_remove_jws_signature_list(self): jws = jwts.make_jws({'a': 1}, self.keypairs) ids = [keypair.identity for keypair in self.keypairs[:2]] jws = jwts.remove_jws_signatures(jws, ids) verified_msg = jwts.verify_jws(jws, self.keypairs[2:]) self.assertIsInstance(verified_msg, dict)
def test_remove_bytes_jws_signature(self): jws = utils.to_bytes(jwts.make_jws({'a': 1}, self.keypairs)) jws = jwts.remove_jws_signatures(jws, self.keypairs[0].identity) verified_msg = jwts.verify_jws(jws, self.keypairs[1:]) self.assertIsInstance(verified_msg, dict)
def test_remove_jws_signature(self): jws = jwts.make_jws({'a': 1}, self.keypairs) jws = jwts.remove_jws_signatures(jws, self.keypairs[0].identity) verified_msg = jwts.verify_jws(jws, self.keypairs[1:]) self.assertIsInstance(verified_msg, dict)