Permalink
Browse files

Merge pull request #293 from msfm/jaxrs-jwt-keystore-path

WFLY-10884 Use the jboss.server.config.dir system property for the file path to jwt.keystore
  • Loading branch information...
emmartins committed Oct 14, 2018
2 parents c5ba388 + 5d1c7d7 commit e1fe87a9c218da731fb48c953e0a7fde886f65d2
@@ -16,6 +16,7 @@
*/
package org.jboss.quickstarts.jaxrsjwt.auth;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.Key;
@@ -43,7 +44,9 @@
PrivateKey pk = null;
try {
KeyStore ks = KeyStore.getInstance("JKS");
fis = new FileInputStream("../standalone/configuration/jwt.keystore");
String configDir = System.getProperty("jboss.server.config.dir");
String keystorePath = configDir + File.separator + "jwt.keystore";
fis = new FileInputStream(keystorePath);
ks.load(fis, password);
Key key = ks.getKey(alias, password);
if (key instanceof PrivateKey) {

0 comments on commit e1fe87a

Please sign in to comment.