Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active January 29, 2018 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sw-samuraj/fcc7e19bba13dadb14103af80871d5c1 to your computer and use it in GitHub Desktop.
Save sw-samuraj/fcc7e19bba13dadb14103af80871d5c1 to your computer and use it in GitHub Desktop.
@Bean
public KeyManager keyManager() {
DefaultResourceLoader loader = new DefaultResourceLoader();
Resource storeFile = loader.getResource("classpath:/saml/samlKeystore.jks");
String storePass = "secure";
Map<String, String> passwords = new HashMap<>();
passwords.put("samuraj", "secure");
String defaultKey = "samuraj";
return new JKSKeyManager(storeFile, storePass, passwords, defaultKey);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment