@Test public void getClientMetadataAsString() { DssMetadataService service = new DssMetadataService(Configuration.getParserPool()); ReflectionTestUtils.setField(service, "keystoreAlias", "localhost"); ReflectionTestUtils.setField(service, "keystorePassword", "password"); ReflectionTestUtils.setField(service, "keystoreFile", new ClassPathResource("dss/localhost.p12")); ReflectionTestUtils.setField(service, "dssClientEntityHostUrl", "https: ReflectionTestUtils.setField(service, "dssClientResponseHostUrl", "https: ReflectionTestUtils.setField(service, "organizationName", "Inera AB"); ReflectionTestUtils.setField(service, "organizationDisplayName", "Webcert"); ReflectionTestUtils.setField(service, "organizationUrl", "https: ReflectionTestUtils.setField(service, "organizationEmail", "teknik.intyg@inera.se"); service.initClientMetadata(); String clientMetadataAsString = service.getClientMetadataAsString(); assertNotNull(clientMetadataAsString); }
public String getClientMetadataAsString() { try { return SAMLUtil.getMetadataAsString(null, clientKeyManager, clientEntityDescriptor, clientExtendedMetadata); } catch (MarshallingException exception) { LOG.error("Unable to get DSS Client metadata"); throw new RuntimeException(exception); } }
DssMetadataService { public String getClientMetadataAsString() { try { return SAMLUtil.getMetadataAsString(null, clientKeyManager, clientEntityDescriptor, clientExtendedMetadata); } catch (MarshallingException exception) { LOG.error("Unable to get DSS Client metadata"); throw new RuntimeException(exception); } } }
DssMetadataService { public String getClientMetadataAsString() { try { return SAMLUtil.getMetadataAsString(null, clientKeyManager, clientEntityDescriptor, clientExtendedMetadata); } catch (MarshallingException exception) { LOG.error("Unable to get DSS Client metadata"); throw new RuntimeException(exception); } } @Autowired  DssMetadataService(ParserPool parserPool); }
DssMetadataService { public String getClientMetadataAsString() { try { return SAMLUtil.getMetadataAsString(null, clientKeyManager, clientEntityDescriptor, clientExtendedMetadata); } catch (MarshallingException exception) { LOG.error("Unable to get DSS Client metadata"); throw new RuntimeException(exception); } } @Autowired  DssMetadataService(ParserPool parserPool); String getDssActionUrl(); String getClientMetadataAsString(); KeyStore getDssKeyStore(); KeySelector getDssKeySelector(); }
DssMetadataService { public String getClientMetadataAsString() { try { return SAMLUtil.getMetadataAsString(null, clientKeyManager, clientEntityDescriptor, clientExtendedMetadata); } catch (MarshallingException exception) { LOG.error("Unable to get DSS Client metadata"); throw new RuntimeException(exception); } } @Autowired  DssMetadataService(ParserPool parserPool); String getDssActionUrl(); String getClientMetadataAsString(); KeyStore getDssKeyStore(); KeySelector getDssKeySelector();  }