This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, go to https://wso2.com/documentation/.

Consent Revocation Listener

This is available only as a WSO2 Update and is effective from July 21, 2021 (07-21-2021). For more information on updating WSO2 Open Banking, see Updating WSO2 Products.

WSO2 Open Banking provides an extension point to send notifications during consent revocation. This extension point is a listener interface known as ConsentRevocationListener and its Fully qualified pathname (FQN) is as follows:

com.wso2.finance.open.banking.uk.consent.mgt.interfaces.ConsentRevocationListener

Use the following method available in the ConsentRevocationListener class, which is invoked during a consent revocation:

public void onRevoke(AccountSetupResponse accountSetupResponse, boolean isInvokedViaDashboard) 

For example, if you extend the ConsentRevocationListener interface and implement a listener named DefaultConsentRevocationListener:

public class DefaultConsentRevocationListener implements ConsentRevocationListener {

  @Override
  public void onRevoke(AccountSetupResponse accountSetupResponse, boolean isInvokedViaDashboard)  {
    //write your logic here
    return;
  }
}

Configurations

  1. Once implemented, build a JAR file for your listener project.

  2. Place the above-created JAR file in the <WSO2_OB_IAM_HOME>/repository/components/lib directory. 

    If it’s an OSGi JAR file, place it in the <WSO2_OB_IAM_HOME>/repository/components/dropins directory.

  3. Configure the new listener as follows:
    1. Open the <WSO2_OB_IAM_HOME>/repository/conf/deployment.toml file.
    2. Add the following tags and configure the listener with its FQN. For example: 

      [open_banking.uk]
      consent_revocation_listener = "com.wso2.finance.open.banking.uk.consent.mgt.listener.DefaultConsentRevocationListener"
    3. Save the above configurations and restart the Identity and Access Management server.