diff --git a/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java b/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java index 021de49..963230f 100644 --- a/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java +++ b/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java @@ -42,6 +42,7 @@ import org.wso2.carbon.idp.mgt.IdentityProviderManagementException; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.service.RealmService; +import org.wso2.carbon.utils.security.KeystoreUtils; import java.nio.charset.StandardCharsets; import java.security.Key; @@ -58,7 +59,6 @@ public class JWTAuthTokenGenerator implements AuthTokenGenerator { private static final Log log = LogFactory.getLog(JWTAuthTokenGenerator.class); - private static final String KEY_STORE_EXTENSION = ".jks"; // We are keeping a private key map which will have private key for each tenant domain. We are keeping this as a // static Map since then we don't need to read the key from keystore every time. private static Map privateKeys = new ConcurrentHashMap<>(); @@ -187,7 +187,6 @@ private int getTenantId(String tenantDomain) throws AuthAPIServerException { private String getTenantKeyStoreName(String tenantDomain) { - String ksName = tenantDomain.trim().replace(".", "-"); - return ksName + KEY_STORE_EXTENSION; + return KeystoreUtils.getKeyStoreFileLocation(tenantDomain); } } diff --git a/pom.xml b/pom.xml index b07642c..c7001a0 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ [1.7.0, 2.0.0) [1.2.0, 2.0.0) - 4.6.0 + 4.9.23-SNAPSHOT [4.5.0, 5.0.0) 5.25.28 [5.20.321, 7.0.0)