Update oracle-tokencleanup.sql
@@ -322,7 +322,7 @@ THEN
THEN
SELECT COUNT(1) into cleaupCount FROM IDN_OAUTH2_AUTHORIZATION_CODE WHERE CODE_ID IN
(SELECT CODE_ID FROM IDN_OAUTH2_AUTHORIZATION_CODE code WHERE NOT EXISTS (SELECT * FROM IDN_OAUTH2_ACCESS_TOKEN tok where tok.TOKEN_ID = code.TOKEN_ID))
- AND (((VALIDITY_PERIOD BETWEEN 0 and :mxValdPrid) AND deleteTimeLimit > (TIME_CREATED + NUMTODSINTERVAL( VALIDITY_PERIOD / 60000, 'MINUTE' ))) OR STATE ='INACTIVE');
+ AND (((VALIDITY_PERIOD BETWEEN 0 and maxValidityPeriod) AND deleteTimeLimit > (TIME_CREATED + NUMTODSINTERVAL( VALIDITY_PERIOD / 60000, 'MINUTE' ))) OR STATE ='INACTIVE');
EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_TOKEN_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''TOTAL CODES SHOULD BE DELETED FROM IDN_OAUTH2_AUTHORIZATION_CODE : '||cleaupCount||''')';
COMMIT;
