{"id":18970304,"url":"https://github.com/athiththan11/token-cache-revoke-handler","last_synced_at":"2025-08-01T22:33:22.128Z","repository":{"id":122658278,"uuid":"352293495","full_name":"athiththan11/Token-Cache-Revoke-Handler","owner":"athiththan11","description":"Token Cache Revoke Handler for WSO2 API Manager","archived":false,"fork":false,"pushed_at":"2021-04-03T12:58:58.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T11:21:23.142Z","etag":null,"topics":["handler","revoke","token-cache","wso2","wso2-api-manager"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/athiththan11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-28T09:55:58.000Z","updated_at":"2021-05-22T17:44:23.000Z","dependencies_parsed_at":"2024-06-24T12:20:26.109Z","dependency_job_id":null,"html_url":"https://github.com/athiththan11/Token-Cache-Revoke-Handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/athiththan11/Token-Cache-Revoke-Handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athiththan11%2FToken-Cache-Revoke-Handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athiththan11%2FToken-Cache-Revoke-Handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athiththan11%2FToken-Cache-Revoke-Handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athiththan11%2FToken-Cache-Revoke-Handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athiththan11","download_url":"https://codeload.github.com/athiththan11/Token-Cache-Revoke-Handler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athiththan11%2FToken-Cache-Revoke-Handler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268305434,"owners_count":24229390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["handler","revoke","token-cache","wso2","wso2-api-manager"],"created_at":"2024-11-08T14:56:36.307Z","updated_at":"2025-08-01T22:33:22.076Z","avatar_url":"https://github.com/athiththan11.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Token Cache Revoke Handler - WSO2 API Manager v2.6\n\nSample handler implementation to revoke the token caches of Gateway component in WSO2 API Manager v2.6.0 using Event-based architecture.\n\n\u003e This handler is designed for WSO2 API Manager v2.6.0 (+1612313472144). The handler needs to be engaged and used with the API Manager v2.6.0 with the latest or after WUM timestamp 1612313472144 to work as expected.\n\n## How it works?\n\nThe provided sample handler will be engaged with `_RevokeAPI_.xml` to revoke the token caches in the Gateway component.\n\nOnce receiving a response from the Revoke endpoint, the handler collects the Revoked token metadata and publishes an event to the configured Traffic Manager component. Whereas the Traffic Manager re-routes the received event and publishes it to all subscribed Gateway components to clear the token caches.\n\n## Build \u0026 Deploy\n\n### Build\n\nExecute the following maven command to build and create a bundle JAR artifact\n\n```sh\nmvn clean package\n```\n\n### Deploy\n\nCopy and place the built JAR artifact from `\u003cproject\u003e/target` directory to `\u003cgateway\u003e/repository/components/dropins` directory in API Manager server. Once deployed, restart the server to load the artifacts.\n\nAdd the following Handler definition and configure the `\u003capim\u003e/repository/deployment/server/synapse-configs/defualt/api/_RevokeAPI_.xml` as following in the Gateway node to engage the built custom handler\n\n```xml\n\u003c!-- _RevokeAPI_.xml --\u003e\n...\n\u003chandlers\u003e\n    \u003chandler class=\"sample.revoke.handlers.handler.TokenCacheRevokeHandler\" /\u003e\n    \u003chandler class=\"org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerCacheExtensionHandler\"/\u003e\n    \u003chandler class=\"org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler\"/\u003e\n\u003c/handlers\u003e\n...\n```\n\n### Configure API Manager (Gateway)\n\nConfigure the Gateway node to publish the data events to the Traffic Manager node as following\n\n\u003e Note: The same following configurations are used to evaluate the Throttling conditions in the API Manager server. Hence, it is not required to re-configure the same if they have been already enabled and configured to publish the events to the respective Traffic Manager nodes\n\n```xml\n\u003c!-- api-manager.xml --\u003e\n...\n\u003cThrottlingConfigurations\u003e\n    \u003cEnableAdvanceThrottling\u003etrue\u003c/EnableAdvanceThrottling\u003e\n    \u003cTrafficManager\u003e\n        \u003cType\u003eBinary\u003c/Type\u003e\n        \u003cReceiverUrlGroup\u003etcp://traffic-manager:9611\u003c/ReceiverUrlGroup\u003e\n        \u003cAuthUrlGroup\u003essl://traffic-manager:9711\u003c/AuthUrlGroup\u003e\n        \u003cUsername\u003etraffic-manager-username\u003c/Username\u003e\n        \u003cPassword\u003etraffic-manager-password\u003c/Password\u003e\n    \u003c/TrafficManager\u003e\n    \u003cDataPublisher\u003e\n        \u003cEnabled\u003etrue\u003c/Enabled\u003e\n        ...\n    \u003c/DataPublisher\u003e\n    \u003cJMSConnectionDetails\u003e\n        \u003cEnabled\u003etrue\u003c/Enabled\u003e\n        \u003cDestination\u003ethrottleData\u003c/Destination\u003e\n        \u003cJMSConnectionParameters\u003e\n            ...\n            \u003cconnectionfactory.TopicConnectionFactory\u003eamqp://traffic-manager-username:traffic-manager-password@clientid/carbon?brokerlist='tcp://traffic-manager:5672'\u003c/connectionfactory.TopicConnectionFactory\u003e\n        \u003c/JMSConnectionParameters\u003e\n    \u003c/JMSConnectionDetails\u003e\n    ...\n\u003c/ThrottlingConfigurations\u003e\n...\n```\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathiththan11%2Ftoken-cache-revoke-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathiththan11%2Ftoken-cache-revoke-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathiththan11%2Ftoken-cache-revoke-handler/lists"}