@Test public void keystoreIsOk() throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, CertificateException, IOException { Resource keystoreRes = configurationUnderTest.getKeystoreResource(); assertNotNull(keystoreRes); KeyStore ks = keystoreFromResource(keystoreRes); assertNotNull(ks); Enumeration<String> aliases = ks.aliases(); assertTrue(aliases.hasMoreElements()); assertEquals(KEYSTORE_ALIASES[0].toUpperCase(), aliases.nextElement().toUpperCase()); assertTrue(ks.isKeyEntry(KEYSTORE_ALIASES[0])); Key key = ks.getKey(KEYSTORE_ALIASES[0], PRIV_KEY_PASSWORDS[0].toCharArray()); assertTrue(key instanceof PrivateKey); Certificate cert = ks.getCertificate(KEYSTORE_ALIASES[0]); assertNotNull(cert); PublicKey publicKey = cert.getPublicKey(); assertNotNull(publicKey); }
@Override public Resource getKeystoreResource() { return keyStoreResourceFromDatabase; }
DatabaseLoadedSAML2ClientConfiguration extends SAML2ClientConfiguration { @Override public Resource getKeystoreResource() { return keyStoreResourceFromDatabase; } }
DatabaseLoadedSAML2ClientConfiguration extends SAML2ClientConfiguration { @Override public Resource getKeystoreResource() { return keyStoreResourceFromDatabase; } DatabaseLoadedSAML2ClientConfiguration(final SamlClientDao dao); }
DatabaseLoadedSAML2ClientConfiguration extends SAML2ClientConfiguration { @Override public Resource getKeystoreResource() { return keyStoreResourceFromDatabase; } DatabaseLoadedSAML2ClientConfiguration(final SamlClientDao dao); String getClientName(); void setClientName(String clientName); @Override Resource getKeystoreResource(); @Override Resource getIdentityProviderMetadataResource(); }
DatabaseLoadedSAML2ClientConfiguration extends SAML2ClientConfiguration { @Override public Resource getKeystoreResource() { return keyStoreResourceFromDatabase; } DatabaseLoadedSAML2ClientConfiguration(final SamlClientDao dao); String getClientName(); void setClientName(String clientName); @Override Resource getKeystoreResource(); @Override Resource getIdentityProviderMetadataResource();  }