From c9d6ba71c82bfd8cf50b300e094be910dd83f4b3 Mon Sep 17 00:00:00 2001 From: akila94 Date: Fri, 29 Nov 2024 15:32:46 +0530 Subject: [PATCH] Refactor variable name --- .../gateway/executor/service/CertValidationService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.gateway/src/main/java/com/wso2/openbanking/accelerator/gateway/executor/service/CertValidationService.java b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.gateway/src/main/java/com/wso2/openbanking/accelerator/gateway/executor/service/CertValidationService.java index bcc8b638..b7a16cbf 100644 --- a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.gateway/src/main/java/com/wso2/openbanking/accelerator/gateway/executor/service/CertValidationService.java +++ b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.gateway/src/main/java/com/wso2/openbanking/accelerator/gateway/executor/service/CertValidationService.java @@ -212,24 +212,24 @@ public boolean validateTppRoles(X509Certificate tppCertificate, List requiredPSD2Roles) throws CertificateValidationException, TPPValidationException { + , List requiredRoles) throws CertificateValidationException, TPPValidationException { // Extract the certContent from the eidas certificate (i.e. roles, authorization number, etc) CertificateContent certContent = CertificateContentExtractor.extract(tppCertificate); if (log.isDebugEnabled()) { - log.debug("The TPP is requesting roles: " + requiredPSD2Roles); + log.debug("The TPP is requesting roles: " + requiredRoles); log.debug("Provided PSD2 eIDAS certificate" + " contains the role: " + certContent.getPspRoles()); } // Validate whether the eIDAS certificate contains the required roles that matches with the token scopes. - for (PSD2RoleEnum requiredRole : requiredPSD2Roles) { + for (PSD2RoleEnum requiredRole : requiredRoles) { if (!(certContent.getPspRoles().contains(requiredRole.name()) || certContent.getPsd2Roles().contains(requiredRole.name()))) { // Return false if any one of the roles that are bound to the scope is not present in the PSD2