Add tenant domain property to CodeValidationRequest
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ page import="com.google.gson.Gson" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
-<%@ page import="org.wso2.carbon.identity.mgt.endpoint.IdentityManagementEndpointUtil" %>
+<%@ page import="org.wso2.carbon.base.MultitenantConstants" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.IdentityManagementEndpointConstants" %>
+<%@ page import="org.wso2.carbon.identity.mgt.endpoint.IdentityManagementEndpointUtil" %>
+<%@ page import="org.wso2.carbon.identity.mgt.endpoint.client.ApiException" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.client.api.NotificationApi" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.client.model.CodeValidationRequest" %>
-<%@ page import="org.wso2.carbon.identity.mgt.endpoint.client.ApiException" %>
-<%@ page import="com.google.gson.Gson" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.client.model.Error" %>
+<%@ page import="org.wso2.carbon.identity.mgt.endpoint.client.model.Property" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.List" %>
<jsp:directive.include file="localize.jsp"/>
<%
String tenantDomain = request.getParameter(IdentityManagementEndpointConstants.TENANT_DOMAIN);
NotificationApi notificationApi = new NotificationApi();
try {
+ List<Property> properties = new ArrayList<>();
+ Property tenantDomainProperty = new Property();
+ tenantDomainProperty.setKey(MultitenantConstants.TENANT_DOMAIN);
+ tenantDomainProperty.setValue(tenantDomain);
+ properties.add(tenantDomainProperty);
+
CodeValidationRequest validationRequest = new CodeValidationRequest();
validationRequest.setCode(confirmationKey);
+ validationRequest.setProperties(properties);
notificationApi.validateCodePostCall(validationRequest);
} catch (ApiException e) {
