def test_reject_software_statement_with_mismatching_issuer(self): fed_key = sym_key() op_root_key = rsa_key() provider_config = self.create_provider_config(op_root_key, fed_key) provider_config["issuer"] = "https://other-op.example.com" rp = RP(None, sym_key(), [], [fed_key], None) with pytest.raises(OIDCFederationError) as exc: rp._validate_provider_configuration( FederationProviderConfigurationResponse(**provider_config)) assert "issuer" in str(exc.value)
def test_reject_provider_configuration_with_missing_parameter(self): rp = RP(None, sym_key(), [], None, None) with pytest.raises(OIDCFederationError) as exc: # default provider config missing all extra required attributes of FederationProviderConfigurationResponse rp._validate_provider_configuration( FederationProviderConfigurationResponse(**DEFAULT_PROVIDER_CONFIG))