From d02462b95fae87bcb12917157f43ad305949abe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Tue, 13 Jun 2023 09:59:18 +0200 Subject: [PATCH] feature/Use Consent Implicit SCA Flow --- .../openbankproject/oauth2/controller/ConsentController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openbankproject/oauth2/controller/ConsentController.java b/src/main/java/com/openbankproject/oauth2/controller/ConsentController.java index bfcec9a..d36f92b 100644 --- a/src/main/java/com/openbankproject/oauth2/controller/ConsentController.java +++ b/src/main/java/com/openbankproject/oauth2/controller/ConsentController.java @@ -68,6 +68,9 @@ public class ConsentController { @Value("${obp.base_url}/obp/v5.1.0/consumer/consent-requests/CONSENT_REQUEST_ID/EMAIL/consents") private String createConsentByConsentRequestIdEmail; + @Value("${obp.base_url}/obp/v5.1.0/consumer/consent-requests/CONSENT_REQUEST_ID/IMPLICIT/consents") + private String createConsentByConsentRequestIdImplicit; + @Value("${obp.base_url}/berlin-group/v1.3/consents/CONSENT_ID/authorisations") private String getConsentAuthorisation; @Value("${oauth2.admin_url}/keys/${oauth2.broadcast_keys:hydra.jwt.access-token}") @@ -327,7 +330,7 @@ public class ConsentController { String consentRequestId = (String) session.getAttribute("consent_request_id"); Map body2 = new HashMap<>(); HttpEntity> entity = new HttpEntity<>(body2, headers); - String url = createConsentByConsentRequestIdEmail + String url = createConsentByConsentRequestIdImplicit .replace("CONSENT_REQUEST_ID", consentRequestId); ResponseEntity responseCreateConsent = restTemplate.exchange(url, HttpMethod.POST, entity, Map.class); session.setAttribute("consent_id", responseCreateConsent.getBody().get("consent_id"));