OpenBankingToolkit / openbanking-aspsp

ForgeRock OpenBanking ASPSP
Apache License 2.0
6 stars 4 forks source link

815: Filter AccountAccessConsents for CustomerInfo consent #472

Closed BohoCode closed 2 years ago

BohoCode commented 2 years ago

Also add empty controllers for the customer info endpoint Issue: https://github.com/ForgeCloud/ob-deploy/issues/815

Intermediate checking so I can rebase on master

815: Creates customer info consents

Route are in place for customer info endpoints, but the store endpoint is not implemented yet.

Should be enough for Jorge to start implementing the Customer Info consent dialog.

Building OBRI with;

Will allow the use of Postman to create a CustomerInfo type AccountAccessRequest with the following data;

{
    "_id" : "CICf74150ba-24b6-4156-8647-0fddda685fe0",
    "accountAccessConsent" : {
        "data" : {
            "consentId" : "CICf74150ba-24b6-4156-8647-0fddda685fe0",
            "creationDateTime" : ISODate("2022-01-10T14:23:02.033Z"),
            "status" : "AWAITINGAUTHORISATION",
            "statusUpdateDateTime" : ISODate("2022-01-10T14:23:02.033Z"),
            "permissions" : [
                "READCUSTOMERINFOCONSENT"
            ],
            "expirationDateTime" : ISODate("2027-02-10T17:48:45.000Z"),
            "transactionFromDateTime" : ISODate("2017-02-10T17:48:45.000Z"),
            "transactionToDateTime" : ISODate("2027-02-10T17:48:45.000Z")
        },
        "risk" : {
            "data" : "{}"
        }
    },
    "clientId" : "fa7a9584-3396-489a-888f-a8d231d1e70a",
    "aispId" : "fa7a9584-3396-489a-888f-a8d231d1e70a",
    "aispName" : "Anonymous - 61dc40d5b3cb1f00112f2afa",
    "consentId" : "CICf74150ba-24b6-4156-8647-0fddda685fe0",
    "accountIds" : [],
    "created" : ISODate("2022-01-10T14:23:02.039Z"),
    "updated" : ISODate("2022-01-10T14:23:02.039Z"),
    "obVersion" : "v3_1_8",
    "_class" : "com.forgerock.openbanking.common.model.openbanking.persistence.account.FRAccountAccessConsent"
}

Note the consent ID starts with CIC rather than AAC denoting the need to gain consent using the CustomerInfoConsent dialog rather than the AccountAccess Consent dialog.

Issue: https://github.com/ForgeCloud/ob-deploy/issues/815