From 0407fff52798ab8ffcc2ec989c19e3c560f0219e Mon Sep 17 00:00:00 2001 From: Dumidu Karunarathna Date: Mon, 4 Jan 2021 17:37:59 +0530 Subject: [PATCH] IP validation handler issue fix --- .../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);