From 6ca653aa1e99b7b76abb91946bfec05dc7562851 Mon Sep 17 00:00:00 2001 From: curry772 Date: Mon, 27 Jul 2026 14:56:20 +0900 Subject: [PATCH] =?UTF-8?q?oauth=20token=20scope=20=EA=B2=80=EC=A6=9D=20?= =?UTF-8?q?=EC=A4=91=20=ED=86=B5=EA=B3=BC=20=EC=8B=9C=ED=82=AC=20scope=20?= =?UTF-8?q?=EB=B0=B0=EC=97=B4=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - oAuthServer pass.scope.list에 ',' 구분자로 통과시킬 scope 리스트 설정(ex:public,oob) --- .../eai/adapter/http/dynamic/filter/ApiAuthFilter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/eactive/eai/adapter/http/dynamic/filter/ApiAuthFilter.java b/src/main/java/com/eactive/eai/adapter/http/dynamic/filter/ApiAuthFilter.java index d93863c..912dbfe 100644 --- a/src/main/java/com/eactive/eai/adapter/http/dynamic/filter/ApiAuthFilter.java +++ b/src/main/java/com/eactive/eai/adapter/http/dynamic/filter/ApiAuthFilter.java @@ -50,6 +50,7 @@ public class ApiAuthFilter implements HttpAdapterFilter { public static final String PROP_GROUP_AUTH_SERVER = "OAuthServer"; public static final String PROP_KEYSTORE_PATH = "certification.publicKeyPath"; + public static final String PASS_SCOPE_LIST = "pass.scope.list"; public static final String ERROR_AUTHENTICATION_FAIL = "E.AUTHENTICATION_FAIL"; public static final String ERROR_AUTHORIZATION_FAIL = "E.AUTHORIZATION_FAIL"; @@ -59,7 +60,7 @@ public class ApiAuthFilter implements HttpAdapterFilter { public static final String PAYLOAD_PARAM_NAME_CLIENT_ID = "client_id"; private JWSVerifier jwsVerifier; - + private String[] passScopeArr = {}; // // CA 토큰 저장소 // private final Map CATokenStore = new ConcurrentHashMap<>(); @@ -89,6 +90,10 @@ public class ApiAuthFilter implements HttpAdapterFilter { } catch (IOException | NoSuchAlgorithmException | RuntimeException | InvalidKeySpecException e) { throw new RuntimeException(e); } + + String passScope = vo.getProperty(PASS_SCOPE_LIST, "oob,public"); + passScopeArr = org.springframework.util.StringUtils.tokenizeToStringArray(passScope, ","); + } @Override @@ -316,9 +321,6 @@ public class ApiAuthFilter implements HttpAdapterFilter { return false; } - String passScope = "oob,public"; - String[] passScopeArr = org.springframework.util.StringUtils.tokenizeToStringArray(passScope, ","); - for (String scope : scopeArr) { for (String pScope : passScopeArr) { if ( StringUtils.equalsAny(scope, pScope)) {