org.springframework.security.saml.key.JKSKeyManager Java Examples
The following examples show how to use
org.springframework.security.saml.key.JKSKeyManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InsightsSecurityConfigurationAdapterSAML.java From Insights with Apache License 2.0 | 7 votes |
/** * Used to load .Jks file * * @return */ @Bean @Conditional(InsightsSAMLBeanInitializationCondition.class) public KeyManager keyManager() { Resource storeFile = resourceLoaderService.getResource("file:" + singleSignOnConfig.getKeyStoreFilePath()); Map<String, String> passwords = new HashMap<>(); passwords.put(singleSignOnConfig.getKeyAlias(), singleSignOnConfig.getKeyPass()); return new JKSKeyManager(storeFile, singleSignOnConfig.getKeyStorePass(), passwords, singleSignOnConfig.getKeyAlias()); }
Example #2
Source File: WebSecurityConfig.java From spring-tsers-auth with Apache License 2.0 | 5 votes |
@Bean public KeyManager keyManager() { DefaultResourceLoader loader = new DefaultResourceLoader(); Resource storeFile = loader .getResource("classpath:/saml/samlKeystore.jks"); String storePass = "nalle123"; Map<String, String> passwords = new HashMap<String, String>(); passwords.put("apollo", "nalle123"); String defaultKey = "apollo"; return new JKSKeyManager(storeFile, storePass, passwords, defaultKey); }
Example #3
Source File: WebSecurityConfig.java From spring-boot-security-saml-sample with Apache License 2.0 | 5 votes |
@Bean public KeyManager keyManager() { DefaultResourceLoader loader = new DefaultResourceLoader(); Resource storeFile = loader .getResource("classpath:/saml/samlKeystore.jks"); String storePass = "nalle123"; Map<String, String> passwords = new HashMap<String, String>(); passwords.put("apollo", "nalle123"); String defaultKey = "apollo"; return new JKSKeyManager(storeFile, storePass, passwords, defaultKey); }
Example #4
Source File: SAMLConfig.java From spring-boot-security-saml-samples with MIT License | 4 votes |
@Bean public KeyManager keyManager(KeystoreFactory keystoreFactory) { KeyStore keystore = keystoreFactory.loadKeystore("classpath:/localhost.cert", "classpath:/localhost.key.der", "localhost", ""); return new JKSKeyManager(keystore, ImmutableMap.of("localhost", ""), "localhost"); }