diff --git a/elink-online-common b/elink-online-common index 6809bf6..f3c2e64 160000 --- a/elink-online-common +++ b/elink-online-common @@ -1 +1 @@ -Subproject commit 6809bf66b85f9473ecfd1a85edddab1b896fbb18 +Subproject commit f3c2e64191b739279437cb2a9125cfcb53a3fbce diff --git a/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java b/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java index 38e4362..2583268 100644 --- a/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java +++ b/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java @@ -1,6 +1,8 @@ package com.eactive.eai.authserver.config; import java.security.KeyPair; +import java.security.interfaces.RSAPrivateKey; +import java.security.interfaces.RSAPublicKey; import java.time.LocalDateTime; import java.util.Arrays; @@ -35,6 +37,7 @@ import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory; import com.eactive.eai.authserver.dao.TokenIssuanceLogDAO; +import com.eactive.eai.authserver.jwt.PssJwtAccessTokenConverter; import com.eactive.eai.authserver.service.OAuth2Manager; import com.eactive.eai.authserver.vo.ClientVO; import com.eactive.eai.common.dao.DAOException; @@ -139,9 +142,10 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap Resource keystore = new ClassPathResource(keystorePath); KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(keystore, keystorePassword.toCharArray()); KeyPair keyPair = keyStoreKeyFactory.getKeyPair(keyAlias, keyPassword.toCharArray()); - JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); - converter.setKeyPair(keyPair); - return converter; + RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); + RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); + + return new PssJwtAccessTokenConverter(privateKey, publicKey); }