This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit 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
Once implemented, build a JAR file for your listener project.
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.- Configure the new listener as follows:
- Open theÂ
<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
file. 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"
- Save the above configurations and restart the Identity and Access Management server.
- Open theÂ