Skip to content

Commit 68ca131

Browse files
committed
refactor code.
remove unused revocation event publishers.
1 parent 9ccd837 commit 68ca131

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

components/apimgt/org.wso2.carbon.apimgt.eventing.hub/src/main/java/org/wso2/carbon/apimgt/eventing/hub/EventHubEventPublisherFactory.java

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ public void configure(Map<String, String> properties) {
5353
public EventPublisher getEventPublisher(EventPublisherType eventPublisherType) {
5454
switch (eventPublisherType) {
5555
case TOKEN_REVOCATION:
56-
case TOKEN_REVOKE_BY_CONSUMER_KEY_EVENT:
57-
case TOKEN_REVOKE_BY_SUBJECT_ENTITY_EVENT:
5856
case ASYNC_WEBHOOKS:
5957
return new EventHubEventStreamServiceEventPublisher();
6058
default:

components/apimgt/org.wso2.carbon.apimgt.eventing/src/main/java/org/wso2/carbon/apimgt/eventing/EventPublisherType.java

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ public enum EventPublisherType {
2929
CACHE_INVALIDATION,
3030
GLOBAL_CACHE_INVALIDATION,
3131
TOKEN_REVOCATION,
32-
TOKEN_REVOKE_BY_CONSUMER_KEY_EVENT,
33-
TOKEN_REVOKE_BY_SUBJECT_ENTITY_EVENT,
3432
ASYNC_WEBHOOKS,
3533
ORGANIZATION_PURGE
3634
}

components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/jwt/RevokedJWTTokensRetriever.java

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ private void loadRevokedJWTTokens(RevokedEventsDTO revokedEventsDTO) {
124124
}
125125

126126
private void loadRevokedConsumerKeys(RevokedEventsDTO revokedEventsDTO) {
127+
127128
if (revokedEventsDTO.getRevokedConsumerKeyList() != null && !revokedEventsDTO.getRevokedConsumerKeyList()
128129
.isEmpty()) {
129130
for (RevokedJWTConsumerKeyDTO revokedConKeyDTO : revokedEventsDTO.getRevokedConsumerKeyList()) {

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java

-4
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,6 @@ public static void init() throws APIManagementException {
422422
eventPublisherFactory.getEventPublisher(EventPublisherType.KEY_TEMPLATE));
423423
eventPublishers.putIfAbsent(EventPublisherType.KEYMGT_EVENT,
424424
eventPublisherFactory.getEventPublisher(EventPublisherType.KEYMGT_EVENT));
425-
eventPublishers.putIfAbsent(EventPublisherType.TOKEN_REVOKE_BY_CONSUMER_KEY_EVENT,
426-
eventPublisherFactory.getEventPublisher(EventPublisherType.TOKEN_REVOKE_BY_CONSUMER_KEY_EVENT));
427-
eventPublishers.putIfAbsent(EventPublisherType.TOKEN_REVOKE_BY_SUBJECT_ENTITY_EVENT,
428-
eventPublisherFactory.getEventPublisher(EventPublisherType.TOKEN_REVOKE_BY_SUBJECT_ENTITY_EVENT));
429425
} catch (EventPublisherException e) {
430426
log.error("Could not initialize the event publishers. Events might not be published properly.");
431427
throw new APIManagementException(e);

0 commit comments

Comments
 (0)