WSO2IS supports for account recovery/validation using identity management features. By default; it is supported to send the user notifications using emails. WSO2IS contains an email sending module with WSO2IS which is based on Axis2. But, you can configure any other notification modules with WSO2IS or extend the existing email sending module.
This blog post describes how you can add custom notification modules.
Step 1. Implement custom notification module by implementing the org.wso2.carbon.identity.mgt.NotificationSendingModule interface. You can find sample project from here. This module is sending a JSON payload to given endpoint as the notification.
Step 2. Copy your implementation as jar file in to the /repository/components/lib directory.
Step 3. Register the module using /repository/conf/security/identity-mgt.properties file.
Please add following property in to the file.
Identity.Mgt.Notification.Sending.Module.2=org.soasecurity.identity.mgt.notification.module.JSONNotificationModule
Step 4. Restart the server.
Step 5. Try out by sending the notification type as JSON. Please note Value “JSON” is configured in the custom module as the “getNotificationType()” value.
Step 6. “notifyUser()” method of your implementation would be executed. In sample module, you can see that it is sent a JSON in to given end point url.
Thanks for reading…!!!