diff --git a/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/conf/financial-services.xml b/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/conf/financial-services.xml index b06288f9b..e22913d16 100644 --- a/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/conf/financial-services.xml +++ b/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/conf/financial-services.xml @@ -38,6 +38,9 @@ org.wso2.financial.services.accelerator.consent.mgt.extensions.validate.impl.DefaultConsentValidator wso2carbon true + + true + org.wso2.financial.services.accelerator.consent.mgt.extensions.admin.impl.DefaultConsentAdminHandler diff --git a/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 b/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 index 5ffdb8ff4..2f52abd5c 100644 --- a/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 +++ b/financial-services-accelerator/accelerators/fs-is/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 @@ -133,6 +133,13 @@ {% else %} true {% endif %} + + {% if financial_services.consent.validation.response_payload_signing.enabled is defined %} + {{financial_services.consent.validation.response_payload_signing.enabled}} + {% else %} + true + {% endif %} + {% if financial_services.consent.admin.handler is defined %} {{financial_services.consent.admin.handler}} diff --git a/financial-services-accelerator/common-mediation-policies/consent-enforcement/consent-enforcement-payload-mediator/src/main/java/org/wso2/financial/services/apim/mediation/policies/consent/enforcement/ConsentEnforcementPayloadMediator.java b/financial-services-accelerator/common-mediation-policies/consent-enforcement/consent-enforcement-payload-mediator/src/main/java/org/wso2/financial/services/apim/mediation/policies/consent/enforcement/ConsentEnforcementPayloadMediator.java index f129b987c..0479d6801 100644 --- a/financial-services-accelerator/common-mediation-policies/consent-enforcement/consent-enforcement-payload-mediator/src/main/java/org/wso2/financial/services/apim/mediation/policies/consent/enforcement/ConsentEnforcementPayloadMediator.java +++ b/financial-services-accelerator/common-mediation-policies/consent-enforcement/consent-enforcement-payload-mediator/src/main/java/org/wso2/financial/services/apim/mediation/policies/consent/enforcement/ConsentEnforcementPayloadMediator.java @@ -80,10 +80,10 @@ public boolean mediate(MessageContext messageContext) { messageContext.getProperty(ConsentEnforcementConstants.API_ELECTED_RESOURCE)); additionalParams.put(ConsentEnforcementConstants.RESOURCE_PARAMS_TAG, ConsentEnforcementUtils.getResourceParamMap(messageContext)); - additionalParams.put(ConsentEnforcementConstants.USER_ID_TAG, - messageContext.getProperty(ConsentEnforcementConstants.USER_ID)); - additionalParams.put(ConsentEnforcementConstants.CLIENT_ID_TAG, - messageContext.getProperty(ConsentEnforcementConstants.CONSUMER_KEY)); + additionalParams.put(ConsentEnforcementConstants.USER_ID_TAG, + messageContext.getProperty(ConsentEnforcementConstants.USER_ID)); + additionalParams.put(ConsentEnforcementConstants.CLIENT_ID_TAG, + messageContext.getProperty(ConsentEnforcementConstants.CONSUMER_KEY)); JSONObject validationRequest; try { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/config/FinancialServicesConfigParser.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/config/FinancialServicesConfigParser.java index 0d2542b7f..a3027804c 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/config/FinancialServicesConfigParser.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/config/FinancialServicesConfigParser.java @@ -744,6 +744,19 @@ public String getConsentValidationConfig() { return source.map(String::trim).orElse(""); } + /** + * Method to retrieve the configuration value indicating whether + * consent response payload signing is enabled. + * + * @return String value ("true" or "false") indicating the configuration state + */ + public String getResponsePayloadSigningConfig() { + + Optional source = getConfigurationFromKeyAsString( + FinancialServicesConstants.CONSENT_RESPONSE_PAYLOAD_SIGNING); + return source.map(String::trim).orElse("false"); + } + //Event notifications configurations. public String getEventNotificationTokenIssuer() { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java index d97b149b1..d4bfcb8d5 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java @@ -59,6 +59,7 @@ public class FinancialServicesConstants { public static final String CONSENT_JWT_PAYLOAD_VALIDATION = "Consent.Validation.JWTPayloadValidation"; public static final String SIGNATURE_ALIAS = "Consent.Validation.RequestSignatureAlias"; public static final String CONSENT_VALIDATOR = "Consent.Validation.Validator"; + public static final String CONSENT_RESPONSE_PAYLOAD_SIGNING = "Consent.Validation.ResponsePayloadSigning.Enabled"; public static final String ADMIN_HANDLER = "Consent.AdminHandler"; public static final String PRESERVE_CONSENT = "Consent.PreserveConsentLink"; public static final String ADMIN_USERNAME = "Admin.Username"; diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceRequest.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceRequest.java index f013916e8..8561a5dab 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceRequest.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceRequest.java @@ -21,7 +21,7 @@ import org.json.JSONObject; /** - * Model class to represent the external service request + * Model class to represent the external service request. */ public class ExternalServiceRequest { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceResponse.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceResponse.java index 4bd4ad3fa..3161c0273 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceResponse.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ExternalServiceResponse.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode; /** - * Model class to represent the external service response + * Model class to represent the external service response. */ public class ExternalServiceResponse { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ServiceExtensionTypeEnum.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ServiceExtensionTypeEnum.java index afba501c0..2c673c468 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ServiceExtensionTypeEnum.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/ServiceExtensionTypeEnum.java @@ -19,7 +19,7 @@ package org.wso2.financial.services.accelerator.common.extension.model; /** - * Service extension type enum + * Service extension type enum. */ public enum ServiceExtensionTypeEnum { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/StatusEnum.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/StatusEnum.java index 8070f80c1..535d1142c 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/StatusEnum.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/extension/model/StatusEnum.java @@ -19,7 +19,7 @@ package org.wso2.financial.services.accelerator.common.extension.model; /** - * Status enum + * Status enum. */ public enum StatusEnum { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/util/ServiceExtensionUtils.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/util/ServiceExtensionUtils.java index c12cc3434..f20e9c25a 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/util/ServiceExtensionUtils.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/util/ServiceExtensionUtils.java @@ -195,7 +195,7 @@ private static boolean isRetryableException(Exception e) { } /** - * Method to map a json object to a model class + * Method to map a json object to a model class. * * @param jsonResponse JSON response string to be mapped * @param clazz Class type to which the JSON response should be mapped diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/AttributeChecks.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/AttributeChecks.java index 1fbf1c30b..06d6b0034 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/AttributeChecks.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/AttributeChecks.java @@ -10,8 +10,8 @@ package org.wso2.financial.services.accelerator.common.validator.validationgroups; /** - * Interface for grouping the validation annotations - * Groups the validations for attributes + * Interface for grouping the validation annotations. + * Groups the validations for attributes. */ public interface AttributeChecks { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/MandatoryChecks.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/MandatoryChecks.java index 2f045395a..abcfcbfbb 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/MandatoryChecks.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/MandatoryChecks.java @@ -10,8 +10,8 @@ package org.wso2.financial.services.accelerator.common.validator.validationgroups; /** - * Interface for grouping the validation annotations - * Grouping the mandatory check constraints + * Interface for grouping the validation annotations. + * Grouping the mandatory check constraints. */ public interface MandatoryChecks { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/SignatureCheck.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/SignatureCheck.java index 2aff5a5a3..49ac2d032 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/SignatureCheck.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/SignatureCheck.java @@ -10,8 +10,8 @@ package org.wso2.financial.services.accelerator.common.validator.validationgroups; /** - * Interface for grouping the validation annotations - * Groups the validation for signature + * Interface for grouping the validation annotations. + * Groups the validation for signature. */ public interface SignatureCheck { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/ValidationOrder.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/ValidationOrder.java index a54f33dbe..b8f32ae69 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/ValidationOrder.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/validator/validationgroups/ValidationOrder.java @@ -12,7 +12,7 @@ import javax.validation.GroupSequence; /** - * Class to define the order of execution for the hibernate validation groups + * Class to define the order of execution for the hibernate validation groups. */ @GroupSequence({MandatoryChecks.class, AttributeChecks.class, SignatureCheck.class}) public interface ValidationOrder { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOUtil.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOUtil.java index 132a1b985..2c820a6c5 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOUtil.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOUtil.java @@ -345,8 +345,9 @@ public static String constructUserIdListFilterCondition(Map> determineOrderOfParamsToSet(String preparedStatement, - Map> applicableConditionsMap, Map columnsMap) { + public static TreeMap> determineOrderOfParamsToSet( + String preparedStatement, + Map> applicableConditionsMap, Map columnsMap) { int indexOfConsentIDsList; int indexOfClientIdsList; diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOTestDataProvider.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOTestDataProvider.java index 2def01aec..e23079600 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOTestDataProvider.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.dao/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/dao/util/ConsentManagementDAOTestDataProvider.java @@ -24,7 +24,7 @@ import java.util.UUID; /** - * Data provider class for Consent Management DAO Test + * Data provider class for Consent Management DAO Test. */ public class ConsentManagementDAOTestDataProvider { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/impl/ExternalAPIConsentRetrievalStep.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/impl/ExternalAPIConsentRetrievalStep.java index 470ad7391..539554a3e 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/impl/ExternalAPIConsentRetrievalStep.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/impl/ExternalAPIConsentRetrievalStep.java @@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.json.JSONArray; import org.json.JSONObject; import org.wso2.financial.services.accelerator.common.config.FinancialServicesConfigParser; import org.wso2.financial.services.accelerator.common.constant.FinancialServicesConstants; @@ -157,6 +158,12 @@ public void execute(ConsentData consentData, JSONObject jsonObject) throws Conse new JSONObject(objectMapper.writeValueAsString(responseDTO.getConsumerData()))); } + // Append display data, if exists, to json object + if (responseDTO.getAdditionalDisplayData() != null) { + jsonObject.put(ConsentAuthorizeConstants.ADDITIONAL_DISPLAY_DATA, + new JSONArray(objectMapper.writeValueAsString(responseDTO.getAdditionalDisplayData()))); + } + // Set request parameters as metadata to be used in persistence extension consentData.addData(ConsentExtensionConstants.REQUEST_PARAMETERS, requestParameters); @@ -258,6 +265,4 @@ private PopulateConsentAuthorizeScreenDTO callExternalService( JSONObject responseJson = new JSONObject(externalServiceResponse.getData().toString()); return objectMapper.readValue(responseJson.toString(), PopulateConsentAuthorizeScreenDTO.class); } - - } diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AccountDTO.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AccountDTO.java index 3020ae78d..73e67468c 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AccountDTO.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AccountDTO.java @@ -33,6 +33,8 @@ public class AccountDTO { @NotEmpty(message = "Display name in Account Object cannot be empty") private String displayName; private String accountId; + private String title; + private String description; private final Map additionalProperties = new HashMap<>(); @@ -52,6 +54,22 @@ public void setDisplayName(String displayName) { this.displayName = displayName; } + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + @JsonAnyGetter public Map getAdditionalProperties() { return additionalProperties; diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AdditionalDisplayDataDTO.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AdditionalDisplayDataDTO.java new file mode 100644 index 000000000..d49f20e9a --- /dev/null +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/AdditionalDisplayDataDTO.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com). + *

+ * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.financial.services.accelerator.consent.mgt.extensions.authorize.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import javax.validation.Valid; + +/** + * Display data object for authorization UI consent retrieval. + * Stores UI metadata and dynamic display items such as unavailable accounts. + */ +public class AdditionalDisplayDataDTO { + + /** + * UI Heading. + */ + private String heading; + + /** + * UI Sub heading. + */ + private String subHeading; + + /** + * Tooltip/help description. + */ + private String description; + + /** + * Dynamic display items. + */ + @Valid + private List> displayList = new ArrayList<>(); + + public AdditionalDisplayDataDTO() { + } + + // Heading + public String getHeading() { + return heading; + } + + public void setHeading(String heading) { + this.heading = heading; + } + + // SubHeading + public String getSubHeading() { + return subHeading; + } + + public void setSubHeading(String subHeading) { + this.subHeading = subHeading; + } + + // Tooltip Description + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + // Display Data + public List> getDisplayList() { + return displayList; + } + + public void setDisplayList(List> displayList) { + this.displayList = displayList; + } + + /** + * Convenience method to add a display item. + */ + public AdditionalDisplayDataDTO addItem(Map item) { + this.displayList.add(item); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AdditionalDisplayDataDTO)) { + return false; + } + AdditionalDisplayDataDTO that = (AdditionalDisplayDataDTO) o; + return Objects.equals(heading, that.heading) && + Objects.equals(subHeading, that.subHeading) && + Objects.equals(description, that.description) && + Objects.equals(displayList, that.displayList); + } + + @Override + public int hashCode() { + return Objects.hash(heading, subHeading, description, displayList); + } +} diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/PopulateConsentAuthorizeScreenDTO.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/PopulateConsentAuthorizeScreenDTO.java index 398bd152c..784a91f83 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/PopulateConsentAuthorizeScreenDTO.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/model/PopulateConsentAuthorizeScreenDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). + * Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com). *

* WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -17,10 +17,13 @@ */ package org.wso2.financial.services.accelerator.consent.mgt.extensions.authorize.model; +import java.util.List; + import javax.validation.Valid; /** - * Wrapper for pre consent authorize flow external response data. + * Wrapper for pre-consent authorize flow external response data. + * Now includes display data for UI sections like blocked accounts. */ public class PopulateConsentAuthorizeScreenDTO { @@ -30,12 +33,14 @@ public class PopulateConsentAuthorizeScreenDTO { @Valid private ConsumerDataDTO consumerData; + @Valid + private List additionalDisplayData; + public ConsentDataDTO getConsentData() { return consentData; } - public void setConsentData( - ConsentDataDTO consentData) { + public void setConsentData(ConsentDataDTO consentData) { this.consentData = consentData; } @@ -43,8 +48,15 @@ public ConsumerDataDTO getConsumerData() { return consumerData; } - public void setConsumerData( - ConsumerDataDTO consumerData) { + public void setConsumerData(ConsumerDataDTO consumerData) { this.consumerData = consumerData; } + + public List getAdditionalDisplayData() { + return additionalDisplayData; + } + + public void setAdditionalDisplayData(List additionalDisplayData) { + this.additionalDisplayData = additionalDisplayData; + } } diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/util/ConsentAuthorizeConstants.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/util/ConsentAuthorizeConstants.java index e68d73a6f..e1ffefb81 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/util/ConsentAuthorizeConstants.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/util/ConsentAuthorizeConstants.java @@ -52,6 +52,8 @@ public class ConsentAuthorizeConstants { public static final String HANDLE_ACCOUNT_SELECTION_SEPARATELY = "handleAccountSelectionSeparately"; public static final String CONSUMER_ACCOUNTS = "consumerAccounts"; public static final String UID = "uid"; + public static final String ADDITIONAL_DISPLAY_DATA = "additionalDisplayData"; + public static final String ADDITIONAL_DISPLAY_SECTION_TAG = "additionalSections"; // For payload to persist authorized consent public static final String REQUEST_PARAMETERS = "requestParameters"; diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authservlet/utils/Utils.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authservlet/utils/Utils.java index d0627d1fe..9752ad069 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authservlet/utils/Utils.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authservlet/utils/Utils.java @@ -205,6 +205,9 @@ private static void appendCustomizationAttributes(Map dataSetMap ConsentAuthorizeConstants.ACCOUNTS); } + List> sections = + (List>) dataSetMap.get(ConsentAuthorizeConstants.ADDITIONAL_DISPLAY_DATA); + attributeMap.put(ConsentAuthorizeConstants.BASIC_CONSENT_DATA, basicConsentData); attributeMap.put(ConsentAuthorizeConstants.PERMISSIONS, permissions); attributeMap.put(ConsentAuthorizeConstants.INITIATED_ACCOUNTS_FOR_CONSENT, initiatedAccountsForConsent); @@ -216,6 +219,9 @@ private static void appendCustomizationAttributes(Map dataSetMap attributeMap.put(ConsentAuthorizeConstants.TYPE, type); attributeMap.put(ConsentAuthorizeConstants.HAS_MULTIPLE_PERMISSIONS, (permissions != null && permissions.size() > 1)); + + // multisection list for the UI + attributeMap.put(ConsentAuthorizeConstants.ADDITIONAL_DISPLAY_SECTION_TAG, sections); } private static void appendI18nAttributes(Map dataSetMap, Map attributeMap) { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/service/ConsentCoreService.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/service/ConsentCoreService.java index 6496d28b1..87046a3f9 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/service/ConsentCoreService.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/service/ConsentCoreService.java @@ -764,7 +764,7 @@ DetailedConsentResource amendDetailedConsent(String consentID, String consentRec throws ConsentManagementException; /** - * This method is used to fetch consents which has a expiring time as a consent attribute + * This method is used to fetch consents which has a expiring time as a consent attribute. * (eligible for expiration) * @param statusesEligibleForExpiration * @return diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentCoreServiceTestUtils.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentCoreServiceTestUtils.java index 9171daa9c..04f4acac1 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentCoreServiceTestUtils.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentCoreServiceTestUtils.java @@ -22,7 +22,7 @@ import java.util.Map; /** - * Utility class for Consent Core Services tests + * Utility class for Consent Core Services tests. */ public class ConsentCoreServiceTestUtils { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentMgtServiceTestData.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentMgtServiceTestData.java index 3fc9a7bf0..9fac234eb 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentMgtServiceTestData.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.service/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/service/util/ConsentMgtServiceTestData.java @@ -38,7 +38,7 @@ import java.util.UUID; /** - * Data class for Consent Management Service Tests + * Data class for Consent Management Service Tests. */ public class ConsentMgtServiceTestData { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/grant/type/handlers/FSGrantHandler.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/grant/type/handlers/FSGrantHandler.java index b64ebb890..010cf224d 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/grant/type/handlers/FSGrantHandler.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/grant/type/handlers/FSGrantHandler.java @@ -26,7 +26,7 @@ public interface FSGrantHandler { /** - * Return should issue refresh token and optionally update the token request context + * Return should issue refresh token and optionally update the token request context. * * @return should issue refresh token */ diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/interceptor/FSDefaultIntrospectionDataProvider.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/interceptor/FSDefaultIntrospectionDataProvider.java index a7e51bdb8..30aa55148 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/interceptor/FSDefaultIntrospectionDataProvider.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/interceptor/FSDefaultIntrospectionDataProvider.java @@ -27,7 +27,7 @@ import java.util.Map; /** - * FS specific default introspection data provider implementation + * FS specific default introspection data provider implementation. */ public class FSDefaultIntrospectionDataProvider extends FSIntrospectionDataProvider { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/util/IdentityServiceExtensionUtils.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/util/IdentityServiceExtensionUtils.java index facf86a2c..c26cd1105 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/util/IdentityServiceExtensionUtils.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.identity.extensions/src/main/java/org/wso2/financial/services/accelerator/identity/extensions/util/IdentityServiceExtensionUtils.java @@ -48,7 +48,7 @@ public class IdentityServiceExtensionUtils { IdentityExtensionsDataHolder.getInstance(); /** - * Validates the action status of the external service response + * Validates the action status of the external service response. * * @param response External service response * @throws IdentityOAuth2Exception diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/css/custom-common.css b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/css/custom-common.css index d4e1c49ba..3bfebbe98 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/css/custom-common.css +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/css/custom-common.css @@ -605,3 +605,11 @@ li.sub::before { padding: 5; border-radius: 5px; } + +.hide { + display: none; +} + +.popover { + z-index: 1060 !important; +} diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default.jsp b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default.jsp index de7e749cd..e8e1d9409 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default.jsp +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default.jsp @@ -86,6 +86,7 @@ + diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default_account_selection.jsp b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default_account_selection.jsp index e60347220..920eb8220 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default_account_selection.jsp +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/fs_default_account_selection.jsp @@ -1,5 +1,5 @@ <%-- -~ Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). +~ Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com). ~ ~ WSO2 LLC. licenses this file to you under the Apache License, ~ Version 2.0 (the "License"); you may not use this file except @@ -49,6 +49,7 @@ session.setAttribute("handleAccountSelectionSeparately", request.getAttribute("handleAccountSelectionSeparately")); session.setAttribute("onFollowingAccounts", request.getAttribute("onFollowingAccounts")); session.setAttribute("buttonConfirm", request.getAttribute("buttonConfirm")); + session.setAttribute("additionalSections", request.getAttribute("additionalSections")); %> @@ -84,6 +85,39 @@ + + +

+
+ +

+ ${section.heading} +

+ + +
+

+ ${section.description} +

+ +

+ ${section.subHeading} + +

+
+
+
+ + +
+
+
+
+ + +
+
diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/account-selection.jsp b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/account-selection.jsp index 9a045397d..e752c6417 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/account-selection.jsp +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/account-selection.jsp @@ -29,15 +29,28 @@
<%-- Display checkboxes for each account if multiple account selection is allowed --%> - +
+ +

+ ${account.description} +

+
+ +

@@ -46,15 +59,22 @@
<%-- Display an account select for all accounts if multiple account selection is not allowed --%> - +
+

+ ⓘ + +
diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts-with-permissions.jsp b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts-with-permissions.jsp index f5d31d427..108891706 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts-with-permissions.jsp +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts-with-permissions.jsp @@ -36,7 +36,18 @@ ${onFollowingAccounts}
    -
  • ${account.displayName}
  • +
  • + ${account.displayName} + +

    + ${account.description} +

    + ⓘ + +
    +
@@ -45,7 +56,18 @@ ${onFollowingAccounts}
    -
  • ${account.displayName}
  • +
  • + ${account.displayName} + +

    + ${account.description} +

    + ⓘ + +
    +
diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts.jsp b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts.jsp index 7c5a3bd90..498526fef 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts.jsp +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/includes/accounts.jsp @@ -31,7 +31,18 @@
    -
  • ${account.displayName}
  • +
  • + ${account.displayName} + +

    + ${account.description} +

    + ⓘ + +
    +
diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/auth-functions.js b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/auth-functions.js index b5853e752..4683134c9 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/auth-functions.js +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/auth-functions.js @@ -56,7 +56,7 @@ function updateAccountNamesFromPermissions() { // Handle unindexed "accounts" const standalonePermission = document.querySelector('input[type="hidden"][name="permission"]'); const standaloneAccounts = document.querySelectorAll('[name="accounts"]'); - if (standalonePermission && standaloneAccount.length > 0) { + if (standalonePermission && standaloneAccounts.length > 0) { standaloneAccounts.forEach(standaloneAccount => { standaloneAccount.setAttribute('name', standalonePermission.value); }); @@ -94,3 +94,4 @@ function denyDefaultClaim() { document.getElementById('consent').value = "deny"; document.getElementById("profile").submit(); } + diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/tooltip-functions.js b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/tooltip-functions.js new file mode 100644 index 000000000..73e8b1e64 --- /dev/null +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.authentication.endpoint/src/main/webapp/js/tooltip-functions.js @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +(function ($) { + if (typeof $ !== 'function') { + return; + } + $(document).ready(function () { + var getTooltipContent = function ($infoIcon) { + var $tooltipWrapper = $infoIcon.closest('.fs-tooltip-wrapper, .pb-1, .fs-select-tooltip-container'); + + if (!$tooltipWrapper.length) { + return $(); + } + + return $tooltipWrapper.find('.fs-tooltip-content').first(); + }; + + var initializePopover = function ($infoIcon) { + var $hiddenContent = getTooltipContent($infoIcon); + + if (!$hiddenContent.length || !$hiddenContent.text().trim()) { + return; + } + + $infoIcon.popover({ + html: true, + container: 'body', + placement: 'right', + trigger: 'hover focus', + content: function () { + return $hiddenContent.html(); + } + }); + }; + + var updateAccountSelectTooltip = function ($accountSelect) { + var $tooltipContainer = $accountSelect.siblings('.fs-select-tooltip-container'); + if (!$tooltipContainer.length) { + return; + } + + var $selectedOption = $accountSelect.find('option:selected'); + var tooltipText = $selectedOption.data('tooltipDescription') || ''; + var hasTooltipText = String(tooltipText).trim().length > 0; + var $tooltipContent = $tooltipContainer.find('.fs-select-tooltip-content'); + var $tooltipTrigger = $tooltipContainer.find('.fs-select-tooltip-trigger'); + + $tooltipContent.text(tooltipText); + $tooltipTrigger.attr('title', $selectedOption.text()); + + if (hasTooltipText) { + if (!$tooltipTrigger.data('bs.popover')) { + initializePopover($tooltipTrigger); + } + $tooltipTrigger.removeClass('hide'); + } else { + $tooltipTrigger.popover('hide'); + $tooltipTrigger.addClass('hide'); + } + }; + + var $infoIcons = $('.fs-tooltip-trigger'); + var $accountSelects = $('.fs-select-with-tooltip'); + + if ($ && typeof $.fn.popover === 'function' && $infoIcons.length) { + $infoIcons.each(function () { + initializePopover($(this)); + }); + } + + if ($accountSelects.length) { + $accountSelects.each(function () { + updateAccountSelectTooltip($(this)); + }); + + $accountSelects.on('change', function () { + updateAccountSelectTooltip($(this)); + }); + } + }); +})(window.jQuery); diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/api/ConsentValidationEndpoint.java b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/api/ConsentValidationEndpoint.java index cb1108e59..bab3e72bd 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/api/ConsentValidationEndpoint.java +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/api/ConsentValidationEndpoint.java @@ -199,8 +199,13 @@ public Response validate(@Context HttpServletRequest request, @Context HttpServl JSONObject responsePayload; try { responsePayload = validationResult.generatePayload(); - responsePayload.put(ConsentExtensionConstants.CONSENT_INFO, - ConsentUtils.signJWTWithDefaultKey(validationResult.getConsentInformation().toString())); + String consentInfoPayload = validationResult.getConsentInformation().toString(); + if (ConsentUtils.isResponsePayloadSigningEnabled()) { + responsePayload.put(ConsentExtensionConstants.CONSENT_INFO, + ConsentUtils.signJWTWithDefaultKey(consentInfoPayload)); + } else { + responsePayload.put(ConsentExtensionConstants.CONSENT_INFO, consentInfoPayload); + } } catch (Exception e) { log.error("Error occurred while getting private key", e); throw new ConsentException(ResponseStatus.INTERNAL_SERVER_ERROR, "Error while getting private key"); diff --git a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/utils/ConsentUtils.java b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/utils/ConsentUtils.java index e2e840d8f..e7e29460d 100644 --- a/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/utils/ConsentUtils.java +++ b/financial-services-accelerator/internal-webapps/org.wso2.financial.services.accelerator.consent.mgt.endpoint/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/endpoint/utils/ConsentUtils.java @@ -471,6 +471,15 @@ public static boolean getConsentJWTPayloadValidatorConfigEnabled() { return Boolean.parseBoolean(FinancialServicesConfigParser.getInstance().getConsentValidationConfig()); } + /** + * This method returns whether consent validation response payload signing is enabled. + * + * @return config value + */ + public static boolean isResponsePayloadSigningEnabled() { + return Boolean.parseBoolean(FinancialServicesConfigParser.getInstance().getResponsePayloadSigningConfig()); + } + /** * Extract and add query parameters from a URL to existing resource map. * Resource parameter map will contain the resource path(ex: diff --git a/financial-services-accelerator/react-apps/self-care-portal/self-care-portal-frontend/package-lock.json b/financial-services-accelerator/react-apps/self-care-portal/self-care-portal-frontend/package-lock.json index 55a3f0417..1cde115f9 100644 --- a/financial-services-accelerator/react-apps/self-care-portal/self-care-portal-frontend/package-lock.json +++ b/financial-services-accelerator/react-apps/self-care-portal/self-care-portal-frontend/package-lock.json @@ -97,6 +97,7 @@ "version": "7.20.12", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", @@ -1974,6 +1975,7 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.32.tgz", "integrity": "sha512-XjqyeLCsR/c/usUpdWcOdVtWFVjPbDFBTQkn2fQRrWhhUoxriQohO2RWDxLyUM8XpD+Zzg5xwJ8gqTYGDLeGaQ==", "hasInstallScript": true, + "peer": true, "dependencies": { "@fortawesome/fontawesome-common-types": "^0.2.32" }, @@ -3154,6 +3156,7 @@ "version": "10.4.1", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz", "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -3780,6 +3783,7 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -4027,6 +4031,7 @@ "version": "4.41.40", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.40.tgz", "integrity": "sha512-u6kMFSBM9HcoTpUXnL6mt2HSzftqb3JgYV6oxIgL2dl6sX6aCa5k6SOkzv5DuZjBTPUE/dJltKtwwuqrkZHpfw==", + "peer": true, "dependencies": { "@types/node": "*", "@types/tapable": "^1", @@ -4080,6 +4085,7 @@ "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "peer": true, "dependencies": { "@typescript-eslint/experimental-utils": "4.33.0", "@typescript-eslint/scope-manager": "4.33.0", @@ -4145,6 +4151,7 @@ "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "4.33.0", "@typescript-eslint/types": "4.33.0", @@ -4562,6 +4569,7 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4641,6 +4649,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5274,6 +5283,7 @@ "version": "0.27.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "peer": true, "dependencies": { "follow-redirects": "^1.14.9", "form-data": "^4.0.0" @@ -6236,6 +6246,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -7792,6 +7803,7 @@ "version": "2.17.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.17.0.tgz", "integrity": "sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA==", + "peer": true, "engines": { "node": ">=0.11" }, @@ -8828,6 +8840,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "peer": true, "dependencies": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.3", @@ -8958,6 +8971,7 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.10.0.tgz", "integrity": "sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw==", + "peer": true, "dependencies": { "lodash": "^4.17.15", "string-natural-compare": "^3.0.1" @@ -8973,6 +8987,7 @@ "version": "2.32.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -9024,6 +9039,7 @@ "version": "24.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.7.0.tgz", "integrity": "sha512-wUxdF2bAZiYSKBclsUMrYHH6WxiBreNjyDxbRv345TIvPeoCEgPNEn3Sa+ZrSqsf1Dl9SqqSREXMHExlMMu1DA==", + "peer": true, "dependencies": { "@typescript-eslint/experimental-utils": "^4.0.1" }, @@ -9044,6 +9060,7 @@ "version": "6.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "peer": true, "dependencies": { "aria-query": "^5.3.2", "array-includes": "^3.1.8", @@ -9080,6 +9097,7 @@ "version": "7.37.5", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", + "peer": true, "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", @@ -9111,6 +9129,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "peer": true, "engines": { "node": ">=10" }, @@ -9149,6 +9168,7 @@ "version": "3.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.2.tgz", "integrity": "sha512-WAmOCt7EbF1XM8XfbCKAEzAPnShkNSwcIsAD2jHdsMUT9mZJPjLCG7pMzbcC8kK366NOuGip8HKLDC+Xk4yIdA==", + "peer": true, "dependencies": { "@typescript-eslint/experimental-utils": "^3.10.1" }, @@ -12686,6 +12706,7 @@ "version": "26.6.0", "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.0.tgz", "integrity": "sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA==", + "peer": true, "dependencies": { "@jest/core": "^26.6.0", "import-local": "^3.0.2", @@ -18175,6 +18196,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "peer": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -18439,6 +18461,7 @@ "version": "17.0.1", "resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz", "integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -18714,6 +18737,7 @@ "version": "17.0.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz", "integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -18742,8 +18766,7 @@ "node_modules/react-is": { "version": "19.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.0.tgz", - "integrity": "sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA==", - "peer": true + "integrity": "sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA==" }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", @@ -18792,6 +18815,7 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", "integrity": "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -19965,19 +19989,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-scripts/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "optional": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/react-scripts/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -20012,6 +20023,7 @@ "version": "4.44.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", "integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.9.0", "@webassemblyjs/helper-module-context": "1.9.0", @@ -20078,6 +20090,7 @@ "version": "3.11.0", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", + "peer": true, "dependencies": { "ansi-html": "0.0.7", "bonjour": "^3.5.0", @@ -21047,6 +21060,7 @@ "version": "1.32.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", + "peer": true, "dependencies": { "@types/estree": "*", "@types/node": "*", @@ -21662,6 +21676,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -22383,6 +22398,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", + "peer": true, "dependencies": { "debug": "^3.2.5", "eventsource": "^1.0.7", @@ -23108,6 +23124,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.2.1.tgz", "integrity": "sha512-sBdgLWrCFTKtmZm/9x7jkIabjFNVzCUeKfoQsM6R3saImkUnjx0QYdLwJHBjY9ifEcmjDamJDVfknWm1yxZPxQ==", + "peer": true, "dependencies": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.4.5", @@ -24850,6 +24867,7 @@ "version": "5.75.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -24897,6 +24915,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", "dev": true, + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^2.0.1", @@ -25123,6 +25142,7 @@ "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -25240,6 +25260,7 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -25892,6 +25913,7 @@ "version": "7.20.12", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", + "peer": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", @@ -27134,6 +27156,7 @@ "version": "1.2.32", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.32.tgz", "integrity": "sha512-XjqyeLCsR/c/usUpdWcOdVtWFVjPbDFBTQkn2fQRrWhhUoxriQohO2RWDxLyUM8XpD+Zzg5xwJ8gqTYGDLeGaQ==", + "peer": true, "requires": { "@fortawesome/fontawesome-common-types": "^0.2.32" } @@ -27997,6 +28020,7 @@ "version": "10.4.1", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz", "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", + "peer": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -28560,6 +28584,7 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", + "peer": true, "requires": { "csstype": "^3.2.2" } @@ -28782,6 +28807,7 @@ "version": "4.41.40", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.40.tgz", "integrity": "sha512-u6kMFSBM9HcoTpUXnL6mt2HSzftqb3JgYV6oxIgL2dl6sX6aCa5k6SOkzv5DuZjBTPUE/dJltKtwwuqrkZHpfw==", + "peer": true, "requires": { "@types/node": "*", "@types/tapable": "^1", @@ -28834,6 +28860,7 @@ "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "peer": true, "requires": { "@typescript-eslint/experimental-utils": "4.33.0", "@typescript-eslint/scope-manager": "4.33.0", @@ -28869,6 +28896,7 @@ "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "peer": true, "requires": { "@typescript-eslint/scope-manager": "4.33.0", "@typescript-eslint/types": "4.33.0", @@ -29211,7 +29239,8 @@ "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "peer": true }, "acorn-globals": { "version": "6.0.0", @@ -29268,6 +29297,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "peer": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -29743,6 +29773,7 @@ "version": "0.27.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "peer": true, "requires": { "follow-redirects": "^1.14.9", "form-data": "^4.0.0" @@ -30548,6 +30579,7 @@ "version": "4.28.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "peer": true, "requires": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -31739,7 +31771,8 @@ "date-fns": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.17.0.tgz", - "integrity": "sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA==" + "integrity": "sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA==", + "peer": true }, "debug": { "version": "4.4.3", @@ -32542,6 +32575,7 @@ "version": "7.32.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "peer": true, "requires": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.3", @@ -32731,6 +32765,7 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.10.0.tgz", "integrity": "sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw==", + "peer": true, "requires": { "lodash": "^4.17.15", "string-natural-compare": "^3.0.1" @@ -32740,6 +32775,7 @@ "version": "2.32.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", + "peer": true, "requires": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -32784,6 +32820,7 @@ "version": "24.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.7.0.tgz", "integrity": "sha512-wUxdF2bAZiYSKBclsUMrYHH6WxiBreNjyDxbRv345TIvPeoCEgPNEn3Sa+ZrSqsf1Dl9SqqSREXMHExlMMu1DA==", + "peer": true, "requires": { "@typescript-eslint/experimental-utils": "^4.0.1" } @@ -32792,6 +32829,7 @@ "version": "6.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "peer": true, "requires": { "aria-query": "^5.3.2", "array-includes": "^3.1.8", @@ -32821,6 +32859,7 @@ "version": "7.37.5", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", + "peer": true, "requires": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", @@ -32866,12 +32905,14 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "peer": true, "requires": {} }, "eslint-plugin-testing-library": { "version": "3.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.2.tgz", "integrity": "sha512-WAmOCt7EbF1XM8XfbCKAEzAPnShkNSwcIsAD2jHdsMUT9mZJPjLCG7pMzbcC8kK366NOuGip8HKLDC+Xk4yIdA==", + "peer": true, "requires": { "@typescript-eslint/experimental-utils": "^3.10.1" }, @@ -35344,6 +35385,7 @@ "version": "26.6.0", "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.0.tgz", "integrity": "sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA==", + "peer": true, "requires": { "@jest/core": "^26.6.0", "import-local": "^3.0.2", @@ -39623,6 +39665,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "peer": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -39838,6 +39881,7 @@ "version": "17.0.1", "resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz", "integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==", + "peer": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -40055,6 +40099,7 @@ "version": "17.0.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz", "integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==", + "peer": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -40077,8 +40122,7 @@ "react-is": { "version": "19.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.0.tgz", - "integrity": "sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA==", - "peer": true + "integrity": "sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -40117,7 +40161,8 @@ "react-refresh": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", - "integrity": "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==" + "integrity": "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==", + "peer": true }, "react-router": { "version": "5.2.0", @@ -41030,13 +41075,6 @@ "repeat-string": "^1.6.1" } }, - "type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "optional": true, - "peer": true - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -41062,6 +41100,7 @@ "version": "4.44.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", "integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==", + "peer": true, "requires": { "@webassemblyjs/ast": "1.9.0", "@webassemblyjs/helper-module-context": "1.9.0", @@ -41155,6 +41194,7 @@ "version": "3.11.0", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", + "peer": true, "requires": { "ansi-html": "0.0.7", "bonjour": "^3.5.0", @@ -41869,6 +41909,7 @@ "version": "1.32.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", + "peer": true, "requires": { "@types/estree": "*", "@types/node": "*", @@ -42321,6 +42362,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "requires": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -42911,6 +42953,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", + "peer": true, "requires": { "debug": "^3.2.5", "eventsource": "^1.0.7", @@ -43501,6 +43544,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.2.1.tgz", "integrity": "sha512-sBdgLWrCFTKtmZm/9x7jkIabjFNVzCUeKfoQsM6R3saImkUnjx0QYdLwJHBjY9ifEcmjDamJDVfknWm1yxZPxQ==", + "peer": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.4.5", @@ -44874,6 +44918,7 @@ "version": "5.75.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "peer": true, "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -44909,7 +44954,8 @@ "acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==" + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "peer": true }, "acorn-import-assertions": { "version": "1.9.0", @@ -44977,6 +45023,7 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "peer": true, "requires": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -45017,6 +45064,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", "dev": true, + "peer": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^2.0.1", diff --git a/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/exception/TokenGenerationException.java b/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/exception/TokenGenerationException.java index b510d8e8e..37b7dd77e 100644 --- a/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/exception/TokenGenerationException.java +++ b/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/exception/TokenGenerationException.java @@ -21,7 +21,7 @@ /** * TokenGenerationException * - * Throws if errors occurred during the request forwarding process + * Throws if errors occurred during the request forwarding process. */ public class TokenGenerationException extends Exception { private static final long serialVersionUID = -6044462346016688554L; diff --git a/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/OAuthService.java b/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/OAuthService.java index 3c61f95a4..8c78565d5 100644 --- a/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/OAuthService.java +++ b/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/OAuthService.java @@ -51,7 +51,7 @@ import javax.servlet.http.HttpServletResponse; /** - * OAuthService + * OAuthService. *

* This specifies service methods to use in oauth2 flow */ diff --git a/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/ResourceInterceptorService.java b/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/ResourceInterceptorService.java index 719f8173f..d95e70f83 100644 --- a/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/ResourceInterceptorService.java +++ b/financial-services-accelerator/react-apps/self-care-portal/src/main/java/org/wso2/financial/services/accelerator/scp/webapp/service/ResourceInterceptorService.java @@ -46,7 +46,7 @@ import javax.ws.rs.HttpMethod; /** - * ResourceInterceptorService + * ResourceInterceptorService. *

* Contains methods to process requests that are forwarding to IS */