From 558e45c0de974b621a75663f3dec8bea625b308a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Fri, 9 Jun 2023 13:55:49 +0200 Subject: [PATCH 01/19] bugfix/Forbid can create entitlement roles at Consent --- obp-api/src/main/scala/code/api/util/ConsentUtil.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/obp-api/src/main/scala/code/api/util/ConsentUtil.scala b/obp-api/src/main/scala/code/api/util/ConsentUtil.scala index 2176817847..a665b39720 100644 --- a/obp-api/src/main/scala/code/api/util/ConsentUtil.scala +++ b/obp-api/src/main/scala/code/api/util/ConsentUtil.scala @@ -4,6 +4,7 @@ import java.text.SimpleDateFormat import java.util.{Date, UUID} import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3.{ConsentAccessJson, PostConsentJson} +import code.api.util.ApiRole.{canCreateEntitlementAtAnyBank, canCreateEntitlementAtOneBank} import code.api.v3_1_0.{PostConsentBodyCommonJson, PostConsentEntitlementJsonV310, PostConsentViewJsonV310} import code.api.{Constant, RequestHeader} import code.bankconnectors.Connector @@ -557,6 +558,8 @@ object Consent { val entitlements: Seq[Role] = for { entitlement <- Entitlement.entitlement.vend.getEntitlementsByUserId(user.userId).getOrElse(Nil) + if !(entitlement.roleName == canCreateEntitlementAtOneBank.toString()) + if !(entitlement.roleName == canCreateEntitlementAtAnyBank.toString()) if consent.everything || consent.entitlements.exists(_ == PostConsentEntitlementJsonV310(entitlement.bankId,entitlement.roleName)) } yield { Role(entitlement.roleName, entitlement.bankId) From d847da442c907710df309fb9faf166150412724b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Tue, 13 Jun 2023 16:31:17 +0200 Subject: [PATCH 02/19] feature/Add endpoint getConsentByConsentId v5.1.0 --- .../scala/code/api/v5_1_0/APIMethods510.scala | 46 ++++++++++++++++++- .../scala/code/api/v5_1_0/ConsentsTest.scala | 12 ++++- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala index 42a216ef42..295182984c 100644 --- a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala +++ b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala @@ -12,6 +12,7 @@ import code.api.v3_0_0.JSONFactory300.createAggregateMetricJson import code.api.v3_1_0.ConsentJsonV310 import code.api.v3_1_0.JSONFactory310.createBadLoginStatusJson import code.api.v4_0_0.{JSONFactory400, PostApiCollectionJson400} +import code.api.v5_0_0.ConsentJsonV500 import code.atmattribute.AtmAttribute import code.bankconnectors.Connector import code.consent.Consents @@ -738,9 +739,50 @@ trait APIMethods510 { } } } - - + + staticResourceDocs += ResourceDoc( + getConsentByConsentId, + implementedInApiVersion, + nameOf(getConsentByConsentId), + "GET", + "/consumer/consents/CONSENT_ID", + "Get Consent By Consent Id", + s""" + |0 + |This endpoint gets the Consent By consent id. + | + |${authenticationRequiredMessage(true)} + | + """.stripMargin, + EmptyBody, + consentJsonV500, + List( + $UserNotLoggedIn, + UnknownError + ), + List(apiTagConsent, apiTagPSD2AIS, apiTagPsd2)) + lazy val getConsentByConsentId: OBPEndpoint = { + case "consumer" :: "consents" :: consentId :: Nil JsonGet _ => { + cc => + for { + consent<- Future { Consents.consentProvider.vend.getConsentByConsentId(consentId)} map { + unboxFullOrFail(_, cc.callContext, ConsentNotFound) + } + } yield { + ( + ConsentJsonV500( + consent.consentId, + consent.jsonWebToken, + consent.status, + Some(consent.consentRequestId) + ), + HttpCode.`200`(cc) + ) + } + } + } + staticResourceDocs += ResourceDoc( revokeConsentAtBank, implementedInApiVersion, diff --git a/obp-api/src/test/scala/code/api/v5_1_0/ConsentsTest.scala b/obp-api/src/test/scala/code/api/v5_1_0/ConsentsTest.scala index 6e1283edd8..afaff87370 100644 --- a/obp-api/src/test/scala/code/api/v5_1_0/ConsentsTest.scala +++ b/obp-api/src/test/scala/code/api/v5_1_0/ConsentsTest.scala @@ -63,6 +63,7 @@ class ConsentsTest extends V510ServerSetup with PropsReset{ object ApiEndpoint4 extends Tag(nameOf(Implementations5_0_0.getConsentByConsentRequestId)) object ApiEndpoint5 extends Tag(nameOf(Implementations4_0_0.getUsers)) object ApiEndpoint6 extends Tag(nameOf(Implementations5_1_0.revokeConsentAtBank)) + object ApiEndpoint7 extends Tag(nameOf(Implementations5_1_0.getConsentByConsentId)) lazy val entitlements = List(PostConsentEntitlementJsonV310("", CanGetAnyUser.toString())) lazy val bankId = testBankId1.value @@ -80,6 +81,7 @@ class ConsentsTest extends V510ServerSetup with PropsReset{ def getConsentRequestUrl(requestId:String) = (v5_1_0_Request / "consumer"/ "consent-requests"/requestId).GET<@(user1) def createConsentByConsentRequestIdEmail(requestId:String) = (v5_1_0_Request / "consumer"/ "consent-requests"/requestId/"EMAIL"/"consents").POST<@(user1) def getConsentByRequestIdUrl(requestId:String) = (v5_1_0_Request / "consumer"/ "consent-requests"/requestId/"consents").GET<@(user1) + def getConsentByIdUrl(requestId:String) = (v5_1_0_Request / "consumer" / "consents" / requestId ).GET<@(user1) def revokeConsentUrl(consentId: String) = (v5_1_0_Request / "banks" / bankId / "consents" / consentId).DELETE feature(s"test $ApiEndpoint6 version $VersionOfApi - Unauthorized access") { @@ -102,7 +104,7 @@ class ConsentsTest extends V510ServerSetup with PropsReset{ } feature(s"Create/Use/Revoke Consent $VersionOfApi") { - scenario("We will call the Create, Get and Delete endpoints with user credentials ", ApiEndpoint1, ApiEndpoint2, ApiEndpoint3, ApiEndpoint4, ApiEndpoint5, ApiEndpoint6, VersionOfApi) { + scenario("We will call the Create, Get and Delete endpoints with user credentials ", ApiEndpoint1, ApiEndpoint2, ApiEndpoint3, ApiEndpoint4, ApiEndpoint5, ApiEndpoint6, ApiEndpoint7, VersionOfApi) { When(s"We try $ApiEndpoint1 v5.0.0") val createConsentResponse = makePostRequest(createConsentRequestUrl, write(postConsentRequestJsonV310)) Then("We should get a 201") @@ -148,6 +150,14 @@ class ConsentsTest extends V510ServerSetup with PropsReset{ getConsentByRequestResponseJson.consent_request_id.head should be(consentRequestId) getConsentByRequestResponseJson.status should be(ConsentStatus.ACCEPTED.toString) + When("We try to make the GET request v5.1.0") + val getConsentById = makeGetRequest(getConsentByIdUrl(getConsentByRequestResponseJson.consent_id)) + Then("We should get a 200") + getConsentById.code should equal(200) + val getConsentByIdJson = getConsentById.body.extract[ConsentJsonV500] + getConsentByIdJson.consent_request_id.head should be(consentRequestId) + getConsentByIdJson.status should be(ConsentStatus.ACCEPTED.toString) + val requestGetUsers = (v5_1_0_Request / "users").GET From b3e5ef474dc1d46c229bd30946f570c6bab3cbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Wed, 14 Jun 2023 12:26:23 +0200 Subject: [PATCH 03/19] feature/Tweak endpoint createConsentByConsentRequestId v5.1.0 --- .../SwaggerDefinitionsJSON.scala | 1 + .../scala/code/api/util/ConsentUtil.scala | 32 +++++++++++++++---- .../code/api/v3_1_0/JSONFactory3.1.0.scala | 1 + .../scala/code/api/v5_0_0/APIMethods500.scala | 1 + .../code/api/v5_0_0/JSONFactory5.0.0.scala | 1 + 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala index 4742c74a2a..2275e4c120 100644 --- a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala +++ b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala @@ -5173,6 +5173,7 @@ object SwaggerDefinitionsJSON { val postConsentRequestJsonV500 = PostConsentRequestJsonV500( everything = false, + bank_id = None, account_access = List(AccountAccessV500( account_routing = accountRoutingJsonV121, view_id = viewIdExample.value diff --git a/obp-api/src/main/scala/code/api/util/ConsentUtil.scala b/obp-api/src/main/scala/code/api/util/ConsentUtil.scala index a665b39720..8e9b6e0ca4 100644 --- a/obp-api/src/main/scala/code/api/util/ConsentUtil.scala +++ b/obp-api/src/main/scala/code/api/util/ConsentUtil.scala @@ -542,9 +542,19 @@ object Consent { // 1. Add views // Please note that consents can only contain Views that the User already has access to. - val views: Seq[ConsentView] = + val allUserViews = Views.views.vend.getPermissionForUser(user).map(_.views).getOrElse(Nil) + val views = consent.bank_id match { + case Some(bankId) => + // Filter out roles for other banks + allUserViews.filterNot { i => + !i.bankId.value.isEmpty() && i.bankId.value != bankId + } + case None => + allUserViews + } + val viewsToAdd: Seq[ConsentView] = for { - view <- Views.views.vend.getPermissionForUser(user).map(_.views).getOrElse(Nil) + view <- views if consent.everything || consent.views.exists(_ == PostConsentViewJsonV310(view.bankId.value,view.accountId.value, view.viewId.value)) } yield { ConsentView( @@ -555,9 +565,19 @@ object Consent { } // 2. Add Roles // Please note that consents can only contain Roles that the User already has access to. - val entitlements: Seq[Role] = + val allUserEntitlements = Entitlement.entitlement.vend.getEntitlementsByUserId(user.userId).getOrElse(Nil) + val entitlements = consent.bank_id match { + case Some(bankId) => + // Filter out roles for other banks + allUserEntitlements.filterNot { i => + !i.bankId.isEmpty() && i.bankId != bankId + } + case None => + allUserEntitlements + } + val entitlementsToAdd: Seq[Role] = for { - entitlement <- Entitlement.entitlement.vend.getEntitlementsByUserId(user.userId).getOrElse(Nil) + entitlement <- entitlements if !(entitlement.roleName == canCreateEntitlementAtOneBank.toString()) if !(entitlement.roleName == canCreateEntitlementAtAnyBank.toString()) if consent.everything || consent.entitlements.exists(_ == PostConsentEntitlementJsonV310(entitlement.bankId,entitlement.roleName)) @@ -575,8 +595,8 @@ object Consent { exp=timeInSeconds + timeToLive, name=None, email=None, - entitlements=entitlements.toList, - views=views.toList, + entitlements=entitlementsToAdd.toList, + views=viewsToAdd.toList, access = None ) diff --git a/obp-api/src/main/scala/code/api/v3_1_0/JSONFactory3.1.0.scala b/obp-api/src/main/scala/code/api/v3_1_0/JSONFactory3.1.0.scala index c7036700a8..41b66593fe 100644 --- a/obp-api/src/main/scala/code/api/v3_1_0/JSONFactory3.1.0.scala +++ b/obp-api/src/main/scala/code/api/v3_1_0/JSONFactory3.1.0.scala @@ -528,6 +528,7 @@ trait PostConsentCommonBody{ case class PostConsentBodyCommonJson( everything: Boolean, + bank_id: Option[String], views: List[PostConsentViewJsonV310], entitlements: List[PostConsentEntitlementJsonV310], consumer_id: Option[String], diff --git a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala index 2649a20187..53bb3cdff1 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala @@ -960,6 +960,7 @@ trait APIMethods500 { postConsentBodyCommonJson = PostConsentBodyCommonJson( everything = consentRequestJson.everything, + bank_id = consentRequestJson.bank_id, views = postConsentViewJsons, entitlements = consentRequestJson.entitlements.getOrElse(Nil), consumer_id = consentRequestJson.consumer_id, diff --git a/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala b/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala index aa263ebeb0..b83a1e0b60 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala @@ -220,6 +220,7 @@ case class AccountAccessV500( case class PostConsentRequestJsonV500( everything: Boolean, + bank_id: Option[String], account_access: List[AccountAccessV500], entitlements: Option[List[PostConsentEntitlementJsonV310]], consumer_id: Option[String], From 87e69193d8774f39221e7748b3f716debe573fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Thu, 15 Jun 2023 15:01:10 +0200 Subject: [PATCH 04/19] feature/Tweak endpoint getConsentByConsentId v5.1.0 --- .../scala/code/api/v5_1_0/APIMethods510.scala | 18 +++++------- .../code/api/v5_1_0/JSONFactory5.1.0.scala | 28 +++++++++++++++++-- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala index 295182984c..3bebf3c5ea 100644 --- a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala +++ b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala @@ -29,9 +29,10 @@ import com.openbankproject.commons.ExecutionContext.Implicits.global import com.openbankproject.commons.model.enums.{AtmAttributeType, UserAttributeType} import com.openbankproject.commons.model.{AtmId, AtmT, BankId} import com.openbankproject.commons.util.{ApiVersion, ScannedApiVersion} -import net.liftweb.common.Full +import net.liftweb.common.{Box, Full} import net.liftweb.http.S import net.liftweb.http.rest.RestHelper +import net.liftweb.json.parse import net.liftweb.mapper.By import net.liftweb.util.Helpers.tryo @@ -766,19 +767,14 @@ trait APIMethods510 { case "consumer" :: "consents" :: consentId :: Nil JsonGet _ => { cc => for { - consent<- Future { Consents.consentProvider.vend.getConsentByConsentId(consentId)} map { + consent <- Future { Consents.consentProvider.vend.getConsentByConsentId(consentId)} map { unboxFullOrFail(_, cc.callContext, ConsentNotFound) } + _ <- Helper.booleanToFuture(failMsg = ConsentNotFound, cc = cc.callContext) { + consent.mUserId == cc.userId + } } yield { - ( - ConsentJsonV500( - consent.consentId, - consent.jsonWebToken, - consent.status, - Some(consent.consentRequestId) - ), - HttpCode.`200`(cc) - ) + (JSONFactory510.getConsentInfoJson(consent), HttpCode.`200`(cc)) } } } diff --git a/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala b/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala index f92161f21a..f6d74cff9b 100644 --- a/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala +++ b/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala @@ -27,7 +27,7 @@ package code.api.v5_1_0 import code.api.Constant -import code.api.util.APIUtil +import code.api.util.{APIUtil, ConsentJWT, CustomJsonFormats, JwtUtil, Role} import code.api.util.APIUtil.gitCommit import code.api.v1_4_0.JSONFactory1_4_0.{LocationJsonV140, MetaJsonV140, transformToLocationFromV140, transformToMetaFromV140} import code.api.v3_0_0.JSONFactory300.{createLocationJson, createMetaJson, transformToAddressFromV300} @@ -39,8 +39,12 @@ import code.users.UserAttribute import code.views.system.{AccountAccess, ViewDefinition} import com.openbankproject.commons.model.{Address, AtmId, AtmT, BankId, Location, Meta} import com.openbankproject.commons.util.{ApiVersion, ScannedApiVersion} - import java.util.Date + +import code.consent.MappedConsent +import net.liftweb.common.Box +import net.liftweb.json.parse + import scala.collection.immutable.List import scala.util.Try @@ -73,6 +77,13 @@ case class CheckSystemIntegrityJsonV510( success: Boolean, debug_info: Option[String] = None ) + +case class ConsentJsonV510(consent_id: String, + jwt: String, + status: String, + consent_request_id: Option[String], + scopes: Option[List[Role]]) + case class CurrencyJsonV510(alphanumeric_code: String) case class CurrenciesJsonV510(currencies: List[CurrencyJsonV510]) @@ -217,7 +228,7 @@ case class UserAttributesResponseJsonV510( -object JSONFactory510 { +object JSONFactory510 extends CustomJsonFormats { def waitingForGodot(sleep: Long): WaitingForGodotJsonV510 = WaitingForGodotJsonV510(sleep) @@ -425,6 +436,17 @@ object JSONFactory510 { ) } + def getConsentInfoJson(consent: MappedConsent): ConsentJsonV510 = { + val jsonWebTokenAsJValue: Box[ConsentJWT] = JwtUtil.getSignedPayloadAsJson(consent.jsonWebToken).map(parse(_).extract[ConsentJWT]) + ConsentJsonV510( + consent.consentId, + consent.jsonWebToken, + consent.status, + Some(consent.consentRequestId), + jsonWebTokenAsJValue.map(_.entitlements).toOption + ) + } + def getApiInfoJSON(apiVersion : ApiVersion, apiVersionStatus: String) = { val organisation = APIUtil.getPropsValue("hosted_by.organisation", "TESOBE") val email = APIUtil.getPropsValue("hosted_by.email", "contact@tesobe.com") From 9eba966b126203e4fd8723140f87449dab753f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Fri, 16 Jun 2023 10:53:14 +0200 Subject: [PATCH 05/19] feature/Tweak function ConsentUtil.filterByBankId --- obp-api/src/main/scala/code/api/util/ConsentUtil.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/obp-api/src/main/scala/code/api/util/ConsentUtil.scala b/obp-api/src/main/scala/code/api/util/ConsentUtil.scala index 8e9b6e0ca4..1d31ffb767 100644 --- a/obp-api/src/main/scala/code/api/util/ConsentUtil.scala +++ b/obp-api/src/main/scala/code/api/util/ConsentUtil.scala @@ -810,6 +810,8 @@ object Consent { val jsonWebTokenAsCaseClass: Box[ConsentJWT] = JwtUtil.getSignedPayloadAsJson(consent.jsonWebToken) .map(parse(_).extract[ConsentJWT]) jsonWebTokenAsCaseClass match { + case Full(consentJWT) => consentJWT.entitlements.exists(_.bank_id.isEmpty()) // System roles + case Full(consentJWT) => consentJWT.entitlements.map(_.bank_id).contains(bankId.value) // Bank level roles case Full(consentJWT) => consentJWT.views.map(_.bank_id).contains(bankId.value) case _ => false } From e627d4c3fb91abd4808cc56e5f1ca5e202918333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Tue, 20 Jun 2023 16:19:00 +0200 Subject: [PATCH 06/19] feature/Get rid of Tag New-Style --- .../ResourceDocs/ResourceDocs-Chinese.json | 435 ++++++------------ 1 file changed, 145 insertions(+), 290 deletions(-) diff --git a/obp-api/src/main/resources/ResourceDocs/ResourceDocs-Chinese.json b/obp-api/src/main/resources/ResourceDocs/ResourceDocs-Chinese.json index da926e0359..e81a77ef2b 100644 --- a/obp-api/src/main/resources/ResourceDocs/ResourceDocs-Chinese.json +++ b/obp-api/src/main/resources/ResourceDocs/ResourceDocs-Chinese.json @@ -93,8 +93,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Metric", - "New-Style" + "Metric" ], "typed_request_body": { "type": "object", @@ -396,8 +395,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -673,8 +671,7 @@ "is_obwg": false, "tags": [ "Standing-Order", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -885,8 +882,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -1443,8 +1439,7 @@ "is_obwg": true, "tags": [ "Account", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -1616,8 +1611,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -1908,8 +1902,7 @@ "is_obwg": true, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -2494,8 +2487,7 @@ "tags": [ "Scope", "Role", - "Entitlement", - "New-Style" + "Entitlement" ], "typed_request_body": { "type": "object", @@ -2546,8 +2538,7 @@ "is_obwg": false, "tags": [ "Consent", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -2609,8 +2600,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Card", - "New-Style" + "Card" ], "typed_request_body": { "type": "object", @@ -2700,8 +2690,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -2826,8 +2815,7 @@ "is_obwg": false, "tags": [ "Dynamic-Entity", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -2889,8 +2877,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -2992,8 +2979,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -3150,8 +3136,7 @@ "is_obwg": false, "tags": [ "Method-Routing", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -3352,8 +3337,7 @@ "tags": [ "Account", "PrivateData", - "PublicData", - "New-Style" + "PublicData" ], "typed_request_body": { "type": "object", @@ -3755,8 +3739,7 @@ "is_obwg": false, "tags": [ "View", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -4121,8 +4104,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -4253,8 +4235,7 @@ "is_obwg": false, "tags": [ "Consumer", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -4610,8 +4591,7 @@ "tags": [ "Account", "Account Information Service (AIS)", - "View", - "New-Style" + "View" ], "typed_request_body": { "type": "object", @@ -4785,8 +4765,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Consumer", - "New-Style" + "Consumer" ], "typed_request_body": { "type": "object", @@ -4912,8 +4891,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -5138,8 +5116,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "System-View", - "New-Style" + "System-View" ], "typed_request_body": { "type": "object", @@ -5586,8 +5563,7 @@ "is_obwg": false, "tags": [ "Account-Public", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -5710,8 +5686,7 @@ "is_obwg": false, "tags": [ "WebUi-Props", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -6226,8 +6201,7 @@ "is_obwg": false, "tags": [ "Webhook", - "Bank", - "New-Style" + "Bank" ], "typed_request_body": { "type": "object", @@ -6321,8 +6295,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -6405,8 +6378,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Consumer", - "New-Style" + "Consumer" ], "typed_request_body": { "type": "object", @@ -6551,8 +6523,7 @@ "is_obwg": true, "tags": [ "Consent", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -6804,8 +6775,7 @@ "is_obwg": false, "tags": [ "Account-Application", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -7384,8 +7354,7 @@ "is_obwg": false, "tags": [ "Role", - "Entitlement", - "New-Style" + "Entitlement" ], "typed_request_body": { "type": "object", @@ -7637,8 +7606,7 @@ "is_obwg": false, "tags": [ "Transaction", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -8078,8 +8046,7 @@ "is_obwg": false, "tags": [ "Standing-Order", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -8273,8 +8240,7 @@ "tags": [ "Transaction", "Account Information Service (AIS)", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -8493,8 +8459,7 @@ "is_obwg": false, "tags": [ "Dynamic-Entity", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -8654,8 +8619,7 @@ "is_obwg": true, "tags": [ "Bank", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -8817,8 +8781,7 @@ "is_obwg": true, "tags": [ "Account", - "Confirmation of Funds Service (PIIS)", - "New-Style" + "Confirmation of Funds Service (PIIS)" ], "typed_request_body": { "type": "object", @@ -9372,8 +9335,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "ATM", - "New-Style" + "ATM" ], "typed_request_body": { "type": "object", @@ -9577,8 +9539,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -10140,8 +10101,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Product", - "New-Style" + "Product" ], "typed_request_body": { "type": "object", @@ -10461,8 +10421,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -10646,8 +10605,7 @@ "is_obwg": false, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -11007,8 +10965,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "System-View", - "New-Style" + "System-View" ], "typed_request_body": { "type": "object", @@ -11292,8 +11249,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -11398,8 +11354,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Card", - "New-Style" + "Card" ], "typed_request_body": { "type": "object", @@ -11567,8 +11522,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -11628,8 +11582,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -11706,8 +11659,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -12010,8 +11962,7 @@ "is_obwg": false, "tags": [ "Dynamic-Entity", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -12173,8 +12124,7 @@ "is_obwg": true, "tags": [ "Bank", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -12429,8 +12379,7 @@ "is_obwg": true, "tags": [ "Branch", - "Bank", - "New-Style" + "Bank" ], "typed_request_body": { "type": "object", @@ -12789,8 +12738,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -12960,8 +12908,7 @@ "is_obwg": false, "tags": [ "Customer", - "FirehoseData", - "New-Style" + "FirehoseData" ], "typed_request_body": { "type": "object", @@ -13151,8 +13098,7 @@ "is_obwg": true, "tags": [ "Counterparty", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -13325,8 +13271,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -13486,8 +13431,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "ATM", - "New-Style" + "ATM" ], "typed_request_body": { "type": "object", @@ -13717,8 +13661,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -13882,8 +13825,7 @@ "is_obwg": false, "tags": [ "Direct-Debit", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -14228,8 +14170,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -14305,8 +14246,7 @@ "is_obwg": false, "tags": [ "User", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -14387,8 +14327,7 @@ "is_obwg": false, "tags": [ "Method-Routing", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -14534,8 +14473,7 @@ "is_obwg": true, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -14731,8 +14669,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Data-Warehouse", - "New-Style" + "Data-Warehouse" ], "typed_request_body": { "type": "object", @@ -14797,8 +14734,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Product", - "New-Style" + "Product" ], "typed_request_body": { "type": "object", @@ -16096,8 +16032,7 @@ "is_obwg": false, "tags": [ "Account-Application", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -16286,8 +16221,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -16517,8 +16451,7 @@ "is_obwg": true, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -16890,8 +16823,7 @@ "tags": [ "Account", "Account Information Service (AIS)", - "PrivateData", - "New-Style" + "PrivateData" ], "typed_request_body": { "type": "object", @@ -17008,8 +16940,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -17137,8 +17068,7 @@ "tags": [ "Account", "Account-Firehose", - "FirehoseData", - "New-Style" + "FirehoseData" ], "typed_request_body": { "type": "object", @@ -17457,8 +17387,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -17693,8 +17622,7 @@ "tags": [ "Account-Public", "Account", - "PublicData", - "New-Style" + "PublicData" ], "typed_request_body": { "type": "object", @@ -17978,8 +17906,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Data-Warehouse", - "New-Style" + "Data-Warehouse" ], "typed_request_body": { "type": "object", @@ -18150,8 +18077,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -18543,8 +18469,7 @@ "is_obwg": false, "tags": [ "Customer", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -19204,8 +19129,7 @@ "is_obwg": false, "tags": [ "Scope", - "Role", - "New-Style" + "Role" ], "typed_request_body": { "type": "object", @@ -19303,8 +19227,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -20082,8 +20005,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -20166,8 +20088,7 @@ "is_obwg": false, "tags": [ "Consumer", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -20288,8 +20209,7 @@ "is_obwg": true, "tags": [ "Account", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -20710,8 +20630,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -20918,8 +20837,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -20993,8 +20911,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -21111,8 +21028,7 @@ "is_obwg": false, "tags": [ "Account-Application", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -21423,8 +21339,7 @@ "is_obwg": true, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -21799,8 +21714,7 @@ "is_obwg": false, "tags": [ "Webhook", - "Bank", - "New-Style" + "Bank" ], "typed_request_body": { "type": "object", @@ -21901,8 +21815,7 @@ "is_obwg": true, "tags": [ "Account", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -22134,8 +22047,7 @@ "is_obwg": true, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -22530,8 +22442,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -23216,8 +23127,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "System-View", - "New-Style" + "System-View" ], "typed_request_body": { "type": "object", @@ -23548,8 +23458,7 @@ "is_obwg": true, "tags": [ "Consent", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -23868,8 +23777,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -24020,8 +23928,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -24323,8 +24230,7 @@ "is_obwg": true, "tags": [ "Consent", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -24645,8 +24551,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -24762,8 +24667,7 @@ "is_obwg": false, "tags": [ "Dynamic-Entity", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -24876,8 +24780,7 @@ "is_obwg": false, "tags": [ "Method-Routing", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -26266,8 +26169,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -26507,8 +26409,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Transaction", - "New-Style" + "Transaction" ], "typed_request_body": { "type": "object", @@ -26902,8 +26803,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -27117,8 +27017,7 @@ "is_obwg": false, "tags": [ "View", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -27616,8 +27515,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -28029,8 +27927,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Role", - "New-Style" + "Role" ], "typed_request_body": { "type": "object", @@ -28195,8 +28092,7 @@ "is_obwg": true, "tags": [ "Branch", - "Bank", - "New-Style" + "Bank" ], "typed_request_body": { "type": "object", @@ -28525,8 +28421,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -28669,8 +28564,7 @@ "is_obwg": false, "tags": [ "Method-Routing", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -28778,8 +28672,7 @@ "is_obwg": false, "tags": [ "WebUi-Props", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -28982,8 +28875,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -29081,8 +28973,7 @@ "is_obwg": false, "tags": [ "Account-Application", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -29265,8 +29156,7 @@ "tags": [ "Scope", "Role", - "Entitlement", - "New-Style" + "Entitlement" ], "typed_request_body": { "type": "object", @@ -29424,8 +29314,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -29588,8 +29477,7 @@ "is_obwg": false, "tags": [ "Consumer", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -30836,8 +30724,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -31018,8 +30905,7 @@ "is_obwg": false, "tags": [ "View", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -31472,8 +31358,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -31540,8 +31425,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "Metric", - "New-Style" + "Metric" ], "typed_request_body": { "type": "object", @@ -31615,8 +31499,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -31683,8 +31566,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "FX", - "New-Style" + "FX" ], "typed_request_body": { "type": "object", @@ -31752,8 +31634,7 @@ "is_obwg": false, "tags": [ "Metric", - "Aggregate-Metrics", - "New-Style" + "Aggregate-Metrics" ], "typed_request_body": { "type": "object", @@ -31844,8 +31725,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -31975,8 +31855,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -32212,8 +32091,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Card", - "New-Style" + "Card" ], "typed_request_body": { "type": "object", @@ -32296,8 +32174,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Product", - "New-Style" + "Product" ], "typed_request_body": { "type": "object", @@ -32616,8 +32493,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -32773,8 +32649,7 @@ "is_obwg": false, "tags": [ "Consent", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -32856,8 +32731,7 @@ "is_obwg": false, "tags": [ "Customer", - "KYC", - "New-Style" + "KYC" ], "typed_request_body": { "type": "object", @@ -32981,8 +32855,7 @@ "is_obwg": false, "tags": [ "Direct-Debit", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -33524,8 +33397,7 @@ "is_obwg": true, "tags": [ "Transaction-Request", - "Payment Initiation Service (PIS)", - "New-Style" + "Payment Initiation Service (PIS)" ], "typed_request_body": { "type": "object", @@ -34212,8 +34084,7 @@ "is_obwg": false, "tags": [ "WebUi-Props", - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -34414,8 +34285,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -34872,8 +34742,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "System-View", - "New-Style" + "System-View" ], "typed_request_body": { "type": "object", @@ -35304,8 +35173,7 @@ "is_obwg": false, "tags": [ "Customer", - "Person", - "New-Style" + "Person" ], "typed_request_body": { "type": "object", @@ -35620,8 +35488,7 @@ "is_obwg": false, "tags": [ "Webhook", - "Bank", - "New-Style" + "Bank" ], "typed_request_body": { "type": "object", @@ -35752,8 +35619,7 @@ "is_obwg": true, "tags": [ "Counterparty", - "Account", - "New-Style" + "Account" ], "typed_request_body": { "type": "object", @@ -35999,8 +35865,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -36202,8 +36067,7 @@ "is_obwg": false, "tags": [ "Account", - "Account Information Service (AIS)", - "New-Style" + "Account Information Service (AIS)" ], "typed_request_body": { "type": "object", @@ -36414,8 +36278,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Customer", - "New-Style" + "Customer" ], "typed_request_body": { "type": "object", @@ -36593,8 +36456,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -36697,8 +36559,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -37000,8 +36861,7 @@ "Transaction", "Account-Firehose", "Transaction-Firehose", - "FirehoseData", - "New-Style" + "FirehoseData" ], "typed_request_body": { "type": "object", @@ -37411,8 +37271,7 @@ "is_psd2": false, "is_obwg": false, "tags": [ - "Product", - "New-Style" + "Product" ], "typed_request_body": { "type": "object", @@ -37466,8 +37325,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -37805,8 +37663,7 @@ "is_psd2": false, "is_obwg": true, "tags": [ - "API", - "New-Style" + "API" ], "typed_request_body": { "type": "object", @@ -38684,8 +38541,7 @@ "tags": [ "Role", "Entitlement", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", @@ -38826,8 +38682,7 @@ "tags": [ "View", "Account", - "User", - "New-Style" + "User" ], "typed_request_body": { "type": "object", From 2ed1501bf73cec3a5bc5f91afc3f22b8531892d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Thu, 22 Jun 2023 16:15:25 +0200 Subject: [PATCH 07/19] feature/Add a guard at the endpoint getConsentByConsentRequestId --- obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala index a3623b5870..050a768641 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala @@ -722,9 +722,12 @@ trait APIMethods500 { cc => for { (_, callContext) <- applicationAccess(cc) - consent<- Future { Consents.consentProvider.vend.getConsentByConsentRequestId(consentRequestId)} map { + consent <- Future { Consents.consentProvider.vend.getConsentByConsentRequestId(consentRequestId)} map { unboxFullOrFail(_, callContext, ConsentRequestNotFound) } + _ <- Helper.booleanToFuture(failMsg = ConsentNotFound, cc = cc.callContext) { + consent.mUserId == cc.userId + } } yield { ( ConsentJsonV500( From f5a26dea9f637d6e74d9e72d1e3fe946d3b3272e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Tue, 27 Jun 2023 15:47:22 +0200 Subject: [PATCH 08/19] feature/Tweak endpoint createConsentRequest v5.0.0 --- .../scala/code/api/v5_0_0/APIMethods500.scala | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala index 050a768641..c155a9f2cc 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala @@ -19,7 +19,7 @@ import code.api.v4_0_0.JSONFactory400.createCustomersMinimalJson import code.api.v4_0_0.{JSONFactory400, PutProductJsonV400} import code.api.v5_0_0.JSONFactory500.{createPhysicalCardJson, createViewJsonV500, createViewsIdsJsonV500, createViewsJsonV500} import code.bankconnectors.Connector -import code.consent.{ConsentRequests, Consents} +import code.consent.{ConsentRequest, ConsentRequests, Consents} import code.entitlement.Entitlement import code.metrics.APIMetrics import code.model._ @@ -611,9 +611,11 @@ trait APIMethods500 { postConsentRequestJsonV500, consentRequestResponseJson, List( - $BankNotFound, InvalidJsonFormat, ConsentMaxTTL, + X509CannotGetCertificate, + X509GeneralError, + InvalidConnectorResponse, UnknownError ), apiTagConsent :: apiTagPSD2AIS :: apiTagPsd2 :: Nil @@ -643,14 +645,7 @@ trait APIMethods500 { i => connectorEmptyResponse(i, callContext) } } yield { - ( - ConsentRequestResponseJson( - createdConsentRequest.consentRequestId, - net.liftweb.json.parse(createdConsentRequest.payload), - createdConsentRequest.consumerId, - ), - HttpCode.`201`(callContext) - ) + (JSONFactory500.createConsentRequestResponseJson(createdConsentRequest), HttpCode.`201`(callContext)) } } } From 2ca9e9f112670e45fdee4f8dd77f3669477f9644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Wed, 28 Jun 2023 12:08:23 +0200 Subject: [PATCH 09/19] feature/Tweak endpoint getConsentRequest v5.0.0 --- .../main/scala/code/api/v5_0_0/APIMethods500.scala | 14 ++++++-------- .../scala/code/api/v5_0_0/ConsentRequestTest.scala | 3 ++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala index c155a9f2cc..b08fd8e618 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala @@ -661,8 +661,11 @@ trait APIMethods500 { EmptyBody, consentRequestResponseJson, List( - $BankNotFound, - ConsentRequestNotFound, + InvalidJsonFormat, + ConsentMaxTTL, + X509CannotGetCertificate, + X509GeneralError, + InvalidConnectorResponse, UnknownError ), apiTagConsent :: apiTagPSD2AIS :: apiTagPsd2 :: Nil @@ -680,12 +683,7 @@ trait APIMethods500 { i => unboxFullOrFail(i,callContext, ConsentRequestNotFound) } } yield { - (ConsentRequestResponseJson( - consent_request_id = createdConsentRequest.consentRequestId, - payload = json.parse(createdConsentRequest.payload), - consumer_id = createdConsentRequest.consumerId - ), - HttpCode.`200`(callContext) + (JSONFactory500.createConsentRequestResponseJson(createdConsentRequest), HttpCode.`200`(callContext) ) } } diff --git a/obp-api/src/test/scala/code/api/v5_0_0/ConsentRequestTest.scala b/obp-api/src/test/scala/code/api/v5_0_0/ConsentRequestTest.scala index a96b0c7650..22a87d247e 100644 --- a/obp-api/src/test/scala/code/api/v5_0_0/ConsentRequestTest.scala +++ b/obp-api/src/test/scala/code/api/v5_0_0/ConsentRequestTest.scala @@ -60,6 +60,7 @@ class ConsentRequestTest extends V500ServerSetupAsync with PropsReset{ object ApiEndpoint3 extends Tag(nameOf(Implementations5_0_0.createConsentByConsentRequestId)) object ApiEndpoint4 extends Tag(nameOf(Implementations5_0_0.getConsentByConsentRequestId)) object ApiEndpoint5 extends Tag(nameOf(Implementations4_0_0.getUsers)) + object ApiEndpoint6 extends Tag(nameOf(Implementations5_0_0.getConsentRequest)) lazy val entitlements = List(PostConsentEntitlementJsonV310("", CanGetAnyUser.toString())) lazy val forbiddenEntitlementOneBank = List(PostConsentEntitlementJsonV310(testBankId1.value, CanCreateEntitlementAtOneBank.toString())) @@ -163,7 +164,7 @@ class ConsentRequestTest extends V500ServerSetupAsync with PropsReset{ // responseGetUsersWrong.body.extract[ErrorMessage].message contains (ConsentHeaderValueInvalid) should be (true) // } - scenario("We will call the Create (IMPLICIT), Get and Delete endpoints with user credentials ", ApiEndpoint1, ApiEndpoint2, ApiEndpoint3, ApiEndpoint4, ApiEndpoint5, VersionOfApi) { + scenario("We will call the Create (IMPLICIT), Get and Delete endpoints with user credentials ", ApiEndpoint1, ApiEndpoint2, ApiEndpoint3, ApiEndpoint4, ApiEndpoint5, ApiEndpoint6, VersionOfApi) { When(s"We try $ApiEndpoint1 v5.0.0") val createConsentResponse = makePostRequest(createConsentRequestUrl, write(postConsentRequestJsonV310)) Then("We should get a 201") From 0f0c59a1494b07e8fc5b2e041dab4762948430fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Thu, 29 Jun 2023 11:04:14 +0200 Subject: [PATCH 10/19] feature/Tweak endpoint getConsentRequest v5.0.0 part 2 --- .../main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala b/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala index b83a1e0b60..3af8599e77 100644 --- a/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala +++ b/obp-api/src/main/scala/code/api/v5_0_0/JSONFactory5.0.0.scala @@ -39,6 +39,7 @@ import code.api.v3_0_0.{AdapterInfoJsonV300, CustomerAttributeResponseJsonV300, import code.api.v3_1_0.{AccountAttributeResponseJson, AccountBasicV310, CustomerWithAttributesJsonV310, PhysicalCardWithAttributesJsonV310, PostConsentEntitlementJsonV310} import code.api.v4_0_0.BankAttributeBankResponseJsonV400 import code.bankattribute.BankAttribute +import code.consent.ConsentRequest import code.customeraccountlinks.CustomerAccountLinkTrait import com.openbankproject.commons.model.{AccountAttribute, AccountRouting, AccountRoutingJsonV121, AmountOfMoneyJsonV121, Bank, BankAccount, CardAttribute, CreateViewJson, Customer, CustomerAttribute, InboundAdapterInfoInternal, InboundStatusMessage, PhysicalCardTrait, UpdateViewJSON, User, UserAuthContext, UserAuthContextUpdate, View, ViewBasic} import net.liftweb.json.JsonAST.JValue @@ -750,7 +751,13 @@ object JSONFactory500 { CustomerAccountLinksJson(customerAccountLinks.map(createCustomerAccountLinkJson)) } - + def createConsentRequestResponseJson(createdConsentRequest: ConsentRequest): ConsentRequestResponseJson = { + ConsentRequestResponseJson( + createdConsentRequest.consentRequestId, + net.liftweb.json.parse(createdConsentRequest.payload), + createdConsentRequest.consumerId, + ) + } def createViewJsonV500(view : View) : ViewJsonV500 = { val alias = From 7b9eb065c98b07f77d639afbbd783c5099f86cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Fri, 30 Jun 2023 16:31:28 +0200 Subject: [PATCH 11/19] refactor/Factor out common code to calculate ETag function --- obp-api/src/main/scala/code/api/util/APIUtil.scala | 6 +++--- obp-api/src/main/scala/code/api/util/HashUtil.scala | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/obp-api/src/main/scala/code/api/util/APIUtil.scala b/obp-api/src/main/scala/code/api/util/APIUtil.scala index 815060ca54..7f86dadf91 100644 --- a/obp-api/src/main/scala/code/api/util/APIUtil.scala +++ b/obp-api/src/main/scala/code/api/util/APIUtil.scala @@ -480,7 +480,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ */ private def checkIfNotMatchHeader(cc: Option[CallContext], httpCode: Int, httpBody: Box[String], headerValue: String): Int = { val url = cc.map(_.url).getOrElse("") - val hash = HashUtil.Sha256Hash(s"${url}${httpBody.getOrElse("")}") + val hash = HashUtil.calculateETag(url, httpBody) if (httpCode == 200 && hash == headerValue) 304 else httpCode } @@ -542,7 +542,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ s"""consumerId${consumerId}::userId${userId}""" } val cacheKey = s"""$compositeKey::${hashedRequestPayload}""" - val eTag = HashUtil.Sha256Hash(s"${url}${httpBody.getOrElse("")}") + val eTag = HashUtil.calculateETag(url, httpBody) if(httpVerb.toUpperCase() == "GET" || httpVerb.toUpperCase() == "HEAD") { // If-Modified-Since can only be used with a GET or HEAD val validETag = MappedETag.find(By(MappedETag.ETagResource, cacheKey)) match { @@ -631,7 +631,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ } private def getRequestHeadersNewStyle(cc: Option[CallContext], httpBody: Box[String]): CustomResponseHeaders = { cc.map { i => - val hash = HashUtil.Sha256Hash(s"${i.url}${httpBody.getOrElse("")}") + val hash = HashUtil.calculateETag(i.url, httpBody) CustomResponseHeaders( List( (ResponseHeader.ETag, hash), diff --git a/obp-api/src/main/scala/code/api/util/HashUtil.scala b/obp-api/src/main/scala/code/api/util/HashUtil.scala index bd8b5836ec..e7960564e3 100644 --- a/obp-api/src/main/scala/code/api/util/HashUtil.scala +++ b/obp-api/src/main/scala/code/api/util/HashUtil.scala @@ -1,6 +1,7 @@ package code.api.util import java.math.BigInteger +import net.liftweb.common.Box object HashUtil { def Sha256Hash(in: String): String = { @@ -10,6 +11,11 @@ object HashUtil { val hashedValue = String.format("%032x", new BigInteger(1, MessageDigest.getInstance("SHA-256").digest(in.getBytes("UTF-8")))) hashedValue } + + // Single Point of Entry in order to calculate ETag + def calculateETag(url: String, httpBody: Box[String]): String = { + HashUtil.Sha256Hash(s"${url}${httpBody.getOrElse("")}") + } def main(args: Array[String]): Unit = { // You can verify hash with command line tool in linux, unix: From 2a44587690eb63f0f1b3fff847b3ee2e34c47a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 3 Jul 2023 16:21:27 +0200 Subject: [PATCH 12/19] feature/Add endpoint getCustomersForUserIdsOnly v5.1.0 --- .../scala/code/api/v5_1_0/APIMethods510.scala | 42 ++++++++ .../code/api/v5_1_0/JSONFactory5.1.0.scala | 10 +- .../scala/code/api/v5_1_0/CustomerTest.scala | 98 +++++++++++++++++++ .../code/api/v5_1_0/V510ServerSetup.scala | 12 +++ 4 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 obp-api/src/test/scala/code/api/v5_1_0/CustomerTest.scala diff --git a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala index 3bebf3c5ea..7add4aad05 100644 --- a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala +++ b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala @@ -8,6 +8,7 @@ import code.api.util.ApiTag._ import code.api.util.ErrorMessages.{$UserNotLoggedIn, BankNotFound, ConsentNotFound, InvalidJsonFormat, UnknownError, UserNotFoundByUserId, UserNotLoggedIn, _} import code.api.util.NewStyle.HttpCode import code.api.util._ +import code.api.v3_0_0.JSONFactory300 import code.api.v3_0_0.JSONFactory300.createAggregateMetricJson import code.api.v3_1_0.ConsentJsonV310 import code.api.v3_1_0.JSONFactory310.createBadLoginStatusJson @@ -26,6 +27,7 @@ import code.util.Helper import code.views.system.{AccountAccess, ViewDefinition} import com.github.dwickern.macros.NameOf.nameOf import com.openbankproject.commons.ExecutionContext.Implicits.global +import com.openbankproject.commons.dto.CustomerAndAttribute import com.openbankproject.commons.model.enums.{AtmAttributeType, UserAttributeType} import com.openbankproject.commons.model.{AtmId, AtmT, BankId} import com.openbankproject.commons.util.{ApiVersion, ScannedApiVersion} @@ -1195,6 +1197,46 @@ trait APIMethods510 { } } + + + staticResourceDocs += ResourceDoc( + getCustomersForUserIdsOnly, + implementedInApiVersion, + nameOf(getCustomersForUserIdsOnly), + "GET", + "/users/current/customers/customer_ids", + "Get Customers for Current User (IDs only)", + s"""Gets all Customers Ids that are linked to a User. + | + | + |${authenticationRequiredMessage(true)} + | + |""", + EmptyBody, + customersWithAttributesJsonV300, + List( + $UserNotLoggedIn, + UserCustomerLinksNotFoundForUser, + UnknownError + ), + List(apiTagCustomer, apiTagUser) + ) + + lazy val getCustomersForUserIdsOnly : OBPEndpoint = { + case "users" :: "current" :: "customers" :: "customer_ids" :: Nil JsonGet _ => { + cc => { + for { + (customers, callContext) <- Connector.connector.vend.getCustomersByUserId(cc.userId, cc.callContext) map { + connectorEmptyResponse(_, cc.callContext) + } + } yield { + (JSONFactory510.createCustomersIds(customers), HttpCode.`200`(callContext)) + } + } + } + } + + staticResourceDocs += ResourceDoc( createAtm, implementedInApiVersion, diff --git a/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala b/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala index f6d74cff9b..2496d4411d 100644 --- a/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala +++ b/obp-api/src/main/scala/code/api/v5_1_0/JSONFactory5.1.0.scala @@ -31,13 +31,13 @@ import code.api.util.{APIUtil, ConsentJWT, CustomJsonFormats, JwtUtil, Role} import code.api.util.APIUtil.gitCommit import code.api.v1_4_0.JSONFactory1_4_0.{LocationJsonV140, MetaJsonV140, transformToLocationFromV140, transformToMetaFromV140} import code.api.v3_0_0.JSONFactory300.{createLocationJson, createMetaJson, transformToAddressFromV300} -import code.api.v3_0_0.{AddressJsonV300, OpeningTimesV300} +import code.api.v3_0_0.{AccountIdJson, AccountsIdsJsonV300, AddressJsonV300, OpeningTimesV300} import code.api.v4_0_0.{EnergySource400, HostedAt400, HostedBy400} import code.atmattribute.AtmAttribute import code.atms.Atms.Atm import code.users.UserAttribute import code.views.system.{AccountAccess, ViewDefinition} -import com.openbankproject.commons.model.{Address, AtmId, AtmT, BankId, Location, Meta} +import com.openbankproject.commons.model.{Address, AtmId, AtmT, BankId, BankIdAccountId, Customer, Location, Meta} import com.openbankproject.commons.util.{ApiVersion, ScannedApiVersion} import java.util.Date @@ -226,9 +226,13 @@ case class UserAttributesResponseJsonV510( user_attributes: List[UserAttributeResponseJsonV510] ) - +case class CustomerIdJson(id: String) +case class CustomersIdsJsonV510(customers: List[CustomerIdJson]) object JSONFactory510 extends CustomJsonFormats { + + def createCustomersIds(customers : List[Customer]): CustomersIdsJsonV510 = + CustomersIdsJsonV510(customers.map(x => CustomerIdJson(x.customerId))) def waitingForGodot(sleep: Long): WaitingForGodotJsonV510 = WaitingForGodotJsonV510(sleep) diff --git a/obp-api/src/test/scala/code/api/v5_1_0/CustomerTest.scala b/obp-api/src/test/scala/code/api/v5_1_0/CustomerTest.scala new file mode 100644 index 0000000000..3ca4931d94 --- /dev/null +++ b/obp-api/src/test/scala/code/api/v5_1_0/CustomerTest.scala @@ -0,0 +1,98 @@ +/** +Open Bank Project - API +Copyright (C) 2011-2022, TESOBE GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . + +Email: contact@tesobe.com +TESOBE GmbH +Osloerstrasse 16/17 +Berlin 13359, Germany + +This product includes software developed at +TESOBE (http://www.tesobe.com/) + */ +package code.api.v5_1_0 + +import java.util.Date + +import code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON +import code.api.util.APIUtil.OAuth._ +import code.api.util.ErrorMessages._ +import code.api.v3_1_0.CustomerJsonV310 +import code.api.v5_1_0.OBPAPI5_1_0.Implementations5_1_0 +import code.customer.CustomerX +import code.usercustomerlinks.UserCustomerLink +import com.github.dwickern.macros.NameOf.nameOf +import com.openbankproject.commons.model.ErrorMessage +import com.openbankproject.commons.util.ApiVersion +import org.scalatest.Tag + +import scala.language.postfixOps + +class CustomerTest extends V510ServerSetup { + + override def beforeAll(): Unit = { + super.beforeAll() + } + + override def afterAll(): Unit = { + super.afterAll() + CustomerX.customerProvider.vend.bulkDeleteCustomers() + UserCustomerLink.userCustomerLink.vend.bulkDeleteUserCustomerLinks() + } + + /** + * Test tags + * Example: To run tests with tag "getPermissions": + * mvn test -D tagsToInclude + * + * This is made possible by the scalatest maven plugin + */ + object VersionOfApi extends Tag(ApiVersion.v5_1_0.toString) + object ApiEndpoint1 extends Tag(nameOf(Implementations5_1_0.getCustomersForUserIdsOnly)) + + lazy val bankId = testBankId1.value + val getCustomerJson = SwaggerDefinitionsJSON.postCustomerOverviewJsonV500 + + feature(s"$ApiEndpoint1 $VersionOfApi - Unauthorized access") { + scenario("We will call the endpoint without user credentials", ApiEndpoint1, VersionOfApi) { + When(s"We make a request $VersionOfApi") + val request = (v5_1_0_Request / "users" / "current" / "customers" / "customer_ids").GET + val response = makeGetRequest(request) + Then("We should get a 401") + response.code should equal(401) + And("error should be " + UserNotLoggedIn) + response.body.extract[ErrorMessage].message should equal (UserNotLoggedIn) + } + } + + feature(s"$ApiEndpoint1 $VersionOfApi - Authorized access") { + scenario(s"We will call the endpoint $ApiEndpoint1 with a user credentials and successful result", ApiEndpoint1, VersionOfApi) { + val legalName = "Evelin Doe" + val mobileNumber = "+44 123 456" + val customer: CustomerJsonV310 = createCustomerEndpointV510(bankId, legalName, mobileNumber) + UserCustomerLink.userCustomerLink.vend.getOCreateUserCustomerLink(resourceUser1.userId, customer.customer_id, new Date(), true) + When(s"We make a request $VersionOfApi") + val request = (v5_1_0_Request / "users" / "current" / "customers" / "customer_ids").GET <@(user1) + val response = makeGetRequest(request) + Then("We should get a 200") + response.code should equal(200) + val ids = response.body.extract[CustomersIdsJsonV510] + ids.customers.map(_.id).filter(_ == customer.customer_id).length should equal(1) + } + } + + +} diff --git a/obp-api/src/test/scala/code/api/v5_1_0/V510ServerSetup.scala b/obp-api/src/test/scala/code/api/v5_1_0/V510ServerSetup.scala index 2df9daee61..32a54de625 100644 --- a/obp-api/src/test/scala/code/api/v5_1_0/V510ServerSetup.scala +++ b/obp-api/src/test/scala/code/api/v5_1_0/V510ServerSetup.scala @@ -3,8 +3,11 @@ package code.api.v5_1_0 import code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON import code.api.util.APIUtil.OAuth.{Consumer, Token, _} import code.api.util.ApiRole +import code.api.util.ApiRole.CanCreateCustomer import code.api.v2_0_0.BasicAccountsJSON +import code.api.v3_1_0.CustomerJsonV310 import code.api.v4_0_0.{AtmJsonV400, BanksJson400} +import code.api.v5_0_0.PostCustomerJsonV500 import code.entitlement.Entitlement import code.setup.{APIResponse, DefaultUsers, ServerSetupWithTestData} import com.openbankproject.commons.util.ApiShortVersions @@ -53,5 +56,14 @@ trait V510ServerSetup extends ServerSetupWithTestData with DefaultUsers { val randomPosition = nextInt(accountsJson.size) accountsJson(randomPosition).id } + + def createCustomerEndpointV510(bankId: String, legalName: String, mobilePhoneNumber: String): CustomerJsonV310 = { + Entitlement.entitlement.vend.addEntitlement(bankId, resourceUser1.userId, CanCreateCustomer.toString) + val request = (v5_0_0_Request / "banks" / bankId / "customers").POST <@(user1) + val response = makePostRequest(request, write(PostCustomerJsonV500(legal_name = legalName,mobile_phone_number = mobilePhoneNumber))) + Then("We should get a 201") + response.code should equal(201) + response.body.extract[CustomerJsonV310] + } } \ No newline at end of file From a89ee8d62e70f4bd432c4e9a70f9863ecf61b96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Tue, 4 Jul 2023 13:23:25 +0200 Subject: [PATCH 13/19] feature/Bump nimbus-jose-jwt from 9.19 to 9.31 --- obp-api/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/obp-api/pom.xml b/obp-api/pom.xml index 6f8c8ea525..2b1873b6bb 100644 --- a/obp-api/pom.xml +++ b/obp-api/pom.xml @@ -296,10 +296,11 @@ scala-nameof_${scala.version} 1.0.3 + com.nimbusds nimbus-jose-jwt - 9.19 + 9.31 com.github.OpenBankProject From 5950f74232be7b124730dd24a5bcdd0f8b2a276b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Wed, 5 Jul 2023 14:03:26 +0200 Subject: [PATCH 14/19] refactor/Unify hydra-client versions --- obp-api/pom.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/obp-api/pom.xml b/obp-api/pom.xml index 2b1873b6bb..44ccf7774e 100644 --- a/obp-api/pom.xml +++ b/obp-api/pom.xml @@ -438,11 +438,14 @@ scala-xml_${scala.version} 1.2.0 - + sh.ory.hydra hydra-client - 1.11.8 + 1.7.8 From 0202d75d4b28e9997c48c6192d96ca1e1562fb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Thu, 6 Jul 2023 09:53:28 +0200 Subject: [PATCH 15/19] bugfix/Fiy typo regarding unify hydra-client versions --- obp-api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obp-api/pom.xml b/obp-api/pom.xml index 44ccf7774e..f334514584 100644 --- a/obp-api/pom.xml +++ b/obp-api/pom.xml @@ -445,7 +445,7 @@ sh.ory.hydra hydra-client - 1.7.8 + 1.7.0 From 9e449d75d74fac14de3b101af58c38c95e4d6629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Fri, 7 Jul 2023 12:15:37 +0200 Subject: [PATCH 16/19] refactor/Remove redundunt hydra-client library --- obp-api/pom.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/obp-api/pom.xml b/obp-api/pom.xml index f334514584..c85119b3c1 100644 --- a/obp-api/pom.xml +++ b/obp-api/pom.xml @@ -438,15 +438,6 @@ scala-xml_${scala.version} 1.2.0 - - - sh.ory.hydra - hydra-client - 1.7.0 - From 087adea3e736f34b3cb83bf93e99d5a239297eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 10 Jul 2023 10:00:05 +0200 Subject: [PATCH 17/19] feature/Bump h2 from 2.1.214 to 2.2.220 --- obp-api/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/obp-api/pom.xml b/obp-api/pom.xml index c85119b3c1..0cbb7cb5b2 100644 --- a/obp-api/pom.xml +++ b/obp-api/pom.xml @@ -121,10 +121,11 @@ ojdbc8 21.5.0.0 + com.h2database h2 - 2.1.214 + 2.2.220 runtime From 5e6834cf6c46293702faac504ba3f1f3b517ccda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Tue, 11 Jul 2023 17:03:57 +0200 Subject: [PATCH 18/19] docfix/Tweak typo at endpoint getConsentByConsentId --- obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala index 7add4aad05..e436c1cd81 100644 --- a/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala +++ b/obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala @@ -752,7 +752,7 @@ trait APIMethods510 { "/consumer/consents/CONSENT_ID", "Get Consent By Consent Id", s""" - |0 + | |This endpoint gets the Consent By consent id. | |${authenticationRequiredMessage(true)} From af8e8cccf564f724d7b99c8a89cb7d1490d06179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 17 Jul 2023 16:43:51 +0200 Subject: [PATCH 19/19] docfix/Fix mocked data indicator in case of BG endpoints --- .../berlin/group/v1_3/AccountInformationServiceAISApi.scala | 4 ++-- .../berlin/group/v1_3/PaymentInitiationServicePISApi.scala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/obp-api/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala b/obp-api/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala index dd61821ad4..d88a7a9092 100644 --- a/obp-api/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala +++ b/obp-api/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala @@ -374,7 +374,7 @@ The account-id is constant at least throughout the lifecycle of a given consent. "GET", "/card-accounts", "Reads a list of card accounts", - s"""${mockedDataText(true)} + s"""${mockedDataText(false)} Reads a list of card accounts with additional information, e.g. balance information. It is assumed that a consent of the PSU to this access is already given and stored on the ASPSP system. The addressed list of card accounts depends then on the PSU ID and the stored consent addressed by consentId, @@ -761,7 +761,7 @@ This method returns the SCA status of a consent initiation's authorisation sub-r "GET", "/accounts/ACCOUNT_ID/transactions/TRANSACTIONID", "Read Transaction Details", - s"""${mockedDataText(true)} + s"""${mockedDataText(false)} Reads transaction details from a given transaction addressed by "transactionId" on a given account addressed by "account-id". This call is only available on transactions as reported in a JSON format. diff --git a/obp-api/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala b/obp-api/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala index a3df2d673f..77922e2348 100644 --- a/obp-api/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala +++ b/obp-api/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala @@ -66,7 +66,7 @@ object APIMethods_PaymentInitiationServicePISApi extends RestHelper { "DELETE", "/PAYMENT_SERVICE/PAYMENT_PRODUCT/PAYMENTID", "Payment Cancellation Request", - s"""${mockedDataText(true)} + s"""${mockedDataText(false)} This method initiates the cancellation of a payment. Depending on the payment-service, the payment-product and the ASPSP's implementation, this TPP call might be sufficient to cancel a payment. If an authorisation of the payment cancellation is mandated by the ASPSP, a corresponding hyperlink will be contained in the