From 93f80c523d131366f082f3f8be692f641a3cbe65 Mon Sep 17 00:00:00 2001 From: Dumidu Karunarathna Date: Fri, 8 Jan 2021 16:34:10 +0530 Subject: [PATCH] commit custom handler fixes to dev branch --- .../dep/ipvalidate/handler/validation/dao/IPValidationDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ipvalidate-handler/src/main/java/com/wso2telco/dep/ipvalidate/handler/validation/dao/IPValidationDao.java b/components/ipvalidate-handler/src/main/java/com/wso2telco/dep/ipvalidate/handler/validation/dao/IPValidationDao.java index 70379ae59..098a555fb 100644 --- a/components/ipvalidate-handler/src/main/java/com/wso2telco/dep/ipvalidate/handler/validation/dao/IPValidationDao.java +++ b/components/ipvalidate-handler/src/main/java/com/wso2telco/dep/ipvalidate/handler/validation/dao/IPValidationDao.java @@ -84,7 +84,7 @@ public String getClientToken(String clientId) throws Exception { ResultSet results = null; String clientIdToken = null; - String sql = "select ACCESS_TOKEN from idn_oauth2_access_token where CONSUMER_KEY_ID = ? and TOKEN_STATE = 'ACTIVE';"; + String sql = "select ACCESS_TOKEN from idn_oauth2_access_token where CONSUMER_KEY_ID = ? and TOKEN_STATE = 'ACTIVE' and GRANT_TYPE = 'client_credentials'"; try { conn = DbUtils.getDbConnection(DataSourceNames.WSO2AM_DB); ps = conn.prepareStatement(sql);