test_class.file: adapters/saml/core/src/test/java/org/keycloak/adapters/cloned/HttpAdapterUtilsTest.java
test_class.identifier: HttpAdapterUtilsTest
test_case.body: @Test
      public void testExtractKeysFromSamlDescriptor() throws ParsingException {
          InputStream xmlStream = HttpAdapterUtilsTest.class.getResourceAsStream("saml-descriptor-valid.xml");
          MultivaluedHashMap<String, KeyInfo> res = HttpAdapterUtils.extractKeysFromSamlDescriptor(xmlStream);
  
          assertThat(res, notNullValue());
          assertThat(res.keySet(), hasItems(KeyTypes.SIGNING.value()));
          assertThat(res.get(KeycloakSamlAdapterV1QNames.ATTR_SIGNING.getQName().getLocalPart()), notNullValue());
          assertThat(res.get(KeycloakSamlAdapterV1QNames.ATTR_SIGNING.getQName().getLocalPart()).size(), equalTo(2));
  
          KeyInfo ki;
          KeyName keyName;
          X509Data x509data;
          X509Certificate x509certificate;
  
          Matcher<Iterable<? super XMLStructure>> x509DataMatcher = hasItem(instanceOf(X509Data.class));
          Matcher<Iterable<? super XMLStructure>> keyNameMatcher = hasItem(instanceOf(KeyName.class));
  
          ki = res.get(KeycloakSamlAdapterV1QNames.ATTR_SIGNING.getQName().getLocalPart()).get(0);
          assertThat(ki.getContent().size(), equalTo(2));
  
          assertThat((Iterable<? super XMLStructure>) ki.getContent(), x509DataMatcher);
          assertThat((Iterable<? super XMLStructure>) ki.getContent(), keyNameMatcher);
  
          keyName = getContent(ki.getContent(), KeyName.class);
          assertThat(keyName.getName(), equalTo("rJkJlvowmv1Id74GznieaAC5jU5QQp_ILzuG-GsweTI"));
  
          x509data = getContent(ki.getContent(), X509Data.class);
          assertThat(x509data, notNullValue());
          x509certificate = getContent(x509data.getContent(), X509Certificate.class);
          assertThat(x509certificate, notNullValue());
          assertThat(x509certificate.getSigAlgName(), equalTo("SHA256withRSA"));
  
          ki = res.get(KeycloakSamlAdapterV1QNames.ATTR_SIGNING.getQName().getLocalPart()).get(1);
          assertThat(ki.getContent().size(), equalTo(2));
          assertThat((Iterable<? super XMLStructure>) ki.getContent(), x509DataMatcher);
          assertThat((Iterable<? super XMLStructure>) ki.getContent(), keyNameMatcher);
  
          keyName = getContent(ki.getContent(), KeyName.class);
          assertThat(keyName.getName(), equalTo("BzYc4GwL8HVrAhNyNdp-lTah2DvU9jU03kby9Ynohr4"));
  
          x509data = getContent(ki.getContent(), X509Data.class);
          assertThat(x509data, notNullValue());
          x509certificate = getContent(x509data.getContent(), X509Certificate.class);
          assertThat(x509certificate, notNullValue());
          assertThat(x509certificate.getSigAlgName(), equalTo("SHA256withRSA"));
  
      }
test_case.class_method_signature: HttpAdapterUtilsTest.testExtractKeysFromSamlDescriptor()
test_case.full_signature: @Test public void testExtractKeysFromSamlDescriptor()
test_case.identifier: testExtractKeysFromSamlDescriptor
test_case.invocations: getResourceAsStream extractKeysFromSamlDescriptor assertThat notNullValue assertThat keySet hasItems value assertThat get getLocalPart getQName notNullValue assertThat size get getLocalPart getQName equalTo hasItem instanceOf hasItem instanceOf get get getLocalPart getQName assertThat size getContent equalTo assertThat getContent assertThat getContent getContent getContent assertThat getName equalTo getContent getContent assertThat notNullValue getContent getContent assertThat notNullValue assertThat getSigAlgName equalTo get get getLocalPart getQName assertThat size getContent equalTo assertThat getContent assertThat getContent getContent getContent assertThat getName equalTo getContent getContent assertThat notNullValue getContent getContent assertThat notNullValue assertThat getSigAlgName equalTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExtractKeysFromSamlDescriptor()
focal_class.file: adapters/saml/core/src/main/java/org/keycloak/adapters/cloned/HttpAdapterUtils.java
focal_class.identifier: HttpAdapterUtils
focal_class.class_method_signature: HttpAdapterUtils.downloadKeysFromSamlDescriptor(HttpClient client, String descriptorUrl)
focal_class.full_signature: public static MultivaluedHashMap<String, KeyInfo> downloadKeysFromSamlDescriptor(HttpClient client, String descriptorUrl)
focal_class.identifier: downloadKeysFromSamlDescriptor
focal_class.modifiers: public static
focal_class.parameters: (HttpClient client, String descriptorUrl)
focal_class.return: MultivaluedHashMap<String, KeyInfo>
focal_class.signature: MultivaluedHashMap<String, KeyInfo> downloadKeysFromSamlDescriptor(HttpClient client, String descriptorUrl)
focal_class.class_method_signature: HttpAdapterUtils.extractKeysFromSamlDescriptor(InputStream xmlStream)
focal_class.full_signature: public static MultivaluedHashMap<String, KeyInfo> extractKeysFromSamlDescriptor(InputStream xmlStream)
focal_class.identifier: extractKeysFromSamlDescriptor
focal_class.modifiers: public static
focal_class.parameters: (InputStream xmlStream)
focal_class.return: MultivaluedHashMap<String, KeyInfo>
focal_class.signature: MultivaluedHashMap<String, KeyInfo> extractKeysFromSamlDescriptor(InputStream xmlStream)
focal_method.body: public static MultivaluedHashMap<String, KeyInfo> extractKeysFromSamlDescriptor(InputStream xmlStream) throws ParsingException {
          Object res = new SamlDescriptorIDPKeysExtractor().parse(xmlStream);
          return (MultivaluedHashMap<String, KeyInfo>) res;
      }
focal_method.class_method_signature: HttpAdapterUtils.extractKeysFromSamlDescriptor(InputStream xmlStream)
focal_method.full_signature: public static MultivaluedHashMap<String, KeyInfo> extractKeysFromSamlDescriptor(InputStream xmlStream)
focal_method.identifier: extractKeysFromSamlDescriptor
focal_method.invocations: parse
focal_method.modifiers: public static
focal_method.parameters: (InputStream xmlStream)
focal_method.return: MultivaluedHashMap<String, KeyInfo>
focal_method.signature: MultivaluedHashMap<String, KeyInfo> extractKeysFromSamlDescriptor(InputStream xmlStream)