oauth token scope 검증 중 통과 시킬 scope 배열 리스트 설정으로 변경

- oAuthServer pass.scope.list에 ',' 구분자로 통과시킬 scope 리스트
  설정(ex:public,oob)
This commit is contained in:
curry772
2026-07-27 14:56:20 +09:00
parent 90941bff54
commit 6ca653aa1e
@@ -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<String, BearerTokenInfo> 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)) {