diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/AccountsApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/AccountsApi.scala index bca13258fd..ee01fe1577 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/AccountsApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/AccountsApi.scala @@ -53,7 +53,7 @@ object APIMethods_AccountsApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -61,7 +61,7 @@ object APIMethods_AccountsApi extends RestHelper { case "banking":: "accounts" :: accountId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -93,7 +93,7 @@ object APIMethods_AccountsApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -101,7 +101,7 @@ object APIMethods_AccountsApi extends RestHelper { case "banking":: "accounts" :: accountId:: "transactions" :: transactionId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -194,7 +194,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -202,7 +202,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts" :: accountId:: "transactions" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -310,7 +310,7 @@ Some general notes that apply to all end points that retrieve transactions: // "first" : "first" // } //}"""), -// List(UserNotLoggedIn, UnknownError), +// List(AuthenticatedUserIsRequired, UnknownError), // // ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil // ) @@ -319,7 +319,7 @@ Some general notes that apply to all end points that retrieve transactions: // case "banking":: "accounts" :: Nil JsonGet _ => { // cc => // for { -// (Full(u), callContext) <- authorizedAccess(cc, UserNotLoggedIn) +// (Full(u), callContext) <- authorizedAccess(cc, AuthenticatedUserIsRequired) // } yield { // (json.parse("""{ // "data" : { @@ -394,7 +394,7 @@ Some general notes that apply to all end points that retrieve transactions: // "self" : "self" // } //}"""), -// List(UserNotLoggedIn, UnknownError), +// List(AuthenticatedUserIsRequired, UnknownError), // // ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil // ) @@ -403,7 +403,7 @@ Some general notes that apply to all end points that retrieve transactions: // case "banking":: "accounts" :: accountId:: "balance" :: Nil JsonGet _ => { // cc => // for { -// (Full(u), callContext) <- authorizedAccess(cc, UserNotLoggedIn) +// (Full(u), callContext) <- authorizedAccess(cc, AuthenticatedUserIsRequired) // } yield { // (json.parse("""{ // "data" : { @@ -486,7 +486,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -494,7 +494,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts":: "balances" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -605,7 +605,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -613,7 +613,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts":: "balances" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/BankingApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/BankingApi.scala index 60a9aadf76..4473838552 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/BankingApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/BankingApi.scala @@ -65,7 +65,7 @@ object APIMethods_BankingApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -73,7 +73,7 @@ object APIMethods_BankingApi extends RestHelper { case "banking":: "accounts" :: accountId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -105,7 +105,7 @@ object APIMethods_BankingApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Payees") :: apiTagMockedData :: Nil ) @@ -113,7 +113,7 @@ object APIMethods_BankingApi extends RestHelper { case "banking":: "payees" :: payeeId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -145,7 +145,7 @@ object APIMethods_BankingApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Products") :: apiTagMockedData :: Nil ) @@ -153,7 +153,7 @@ object APIMethods_BankingApi extends RestHelper { case "banking":: "products" :: productId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -185,7 +185,7 @@ object APIMethods_BankingApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -193,7 +193,7 @@ object APIMethods_BankingApi extends RestHelper { case "banking":: "accounts" :: accountId:: "transactions" :: transactionId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -286,7 +286,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -294,7 +294,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts" :: accountId:: "transactions" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -402,7 +402,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: Nil ) @@ -410,7 +410,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) availablePrivateAccounts <- Views.views.vend.getPrivateBankAccountsFuture(u, BankId(defaultBankId)) (coreAccounts, callContext) <- NewStyle.function.getCoreBankAccountsFuture(availablePrivateAccounts, callContext) } yield { @@ -452,7 +452,7 @@ Some general notes that apply to all end points that retrieve transactions: "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: Nil ) @@ -460,7 +460,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts" :: accountId:: "balance" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) (account, callContext) <- NewStyle.function.checkBankAccountExists(BankId(defaultBankId), AccountId(accountId), callContext) } yield { (JSONFactory_AU_OpenBanking_1_0_0.createAccountBalanceJson(account), HttpCode.`200`(callContext)) @@ -524,7 +524,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -532,7 +532,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts":: "balances" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -643,7 +643,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -651,7 +651,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts":: "balances" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -751,7 +751,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -759,7 +759,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts" :: accountId:: "direct-debits" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -853,7 +853,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -861,7 +861,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts":: "direct-debits" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -960,7 +960,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -968,7 +968,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "accounts":: "direct-debits" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -1052,7 +1052,7 @@ Some general notes that apply to all end points that retrieve transactions: "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Payees") :: apiTagMockedData :: Nil ) @@ -1060,7 +1060,7 @@ Some general notes that apply to all end points that retrieve transactions: case "banking":: "payees" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -1202,7 +1202,7 @@ In addition, the concept of effective date and time has also been included. This "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Products") :: apiTagMockedData :: Nil ) @@ -1210,7 +1210,7 @@ In addition, the concept of effective date and time has also been included. This case "banking":: "products" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -1578,7 +1578,7 @@ In addition, the concept of effective date and time has also been included. This "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -1586,7 +1586,7 @@ In addition, the concept of effective date and time has also been included. This case "banking":: "accounts" :: accountId:: "payments":: "scheduled" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -2196,7 +2196,7 @@ In addition, the concept of effective date and time has also been included. This "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -2204,7 +2204,7 @@ In addition, the concept of effective date and time has also been included. This case "banking":: "payments":: "scheduled" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -2819,7 +2819,7 @@ In addition, the concept of effective date and time has also been included. This "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -2827,7 +2827,7 @@ In addition, the concept of effective date and time has also been included. This case "banking":: "payments":: "scheduled" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CommonApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CommonApi.scala index 4b39158e59..b649a08445 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CommonApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CommonApi.scala @@ -77,7 +77,7 @@ object APIMethods_CommonApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Customer") :: apiTagMockedData :: Nil ) @@ -85,7 +85,7 @@ object APIMethods_CommonApi extends RestHelper { case "common":: "customer" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -148,7 +148,7 @@ object APIMethods_CommonApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Customer") :: apiTagMockedData :: Nil ) @@ -156,7 +156,7 @@ object APIMethods_CommonApi extends RestHelper { case "common":: "customer":: "detail" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -204,7 +204,7 @@ object APIMethods_CommonApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Discovery") :: apiTagMockedData :: Nil ) @@ -212,7 +212,7 @@ object APIMethods_CommonApi extends RestHelper { case "discovery":: "outages" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -262,7 +262,7 @@ object APIMethods_CommonApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Discovery") :: apiTagMockedData :: Nil ) @@ -270,7 +270,7 @@ object APIMethods_CommonApi extends RestHelper { case "discovery":: "status" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CustomerApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CustomerApi.scala index 3e648cab8c..5041a61afc 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CustomerApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/CustomerApi.scala @@ -75,7 +75,7 @@ object APIMethods_CustomerApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Customer") :: apiTagMockedData :: Nil ) @@ -83,7 +83,7 @@ object APIMethods_CustomerApi extends RestHelper { case "common":: "customer" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -146,7 +146,7 @@ object APIMethods_CustomerApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Customer") :: apiTagMockedData :: Nil ) @@ -154,7 +154,7 @@ object APIMethods_CustomerApi extends RestHelper { case "common":: "customer":: "detail" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DirectDebitsApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DirectDebitsApi.scala index 869e19fe9e..035ff3d34b 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DirectDebitsApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DirectDebitsApi.scala @@ -80,7 +80,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -88,7 +88,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { case "banking":: "accounts" :: accountId:: "direct-debits" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -182,7 +182,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -190,7 +190,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { case "banking":: "accounts":: "direct-debits" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -289,7 +289,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -297,7 +297,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { case "banking":: "accounts":: "direct-debits" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DiscoveryApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DiscoveryApi.scala index b434d089c6..70bafc1614 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DiscoveryApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/DiscoveryApi.scala @@ -60,7 +60,7 @@ object APIMethods_DiscoveryApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Discovery") :: apiTagMockedData :: Nil ) @@ -68,7 +68,7 @@ object APIMethods_DiscoveryApi extends RestHelper { case "discovery":: "outages" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -118,7 +118,7 @@ object APIMethods_DiscoveryApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Common") ::ApiTag("Discovery") :: apiTagMockedData :: Nil ) @@ -126,7 +126,7 @@ object APIMethods_DiscoveryApi extends RestHelper { case "discovery":: "status" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/PayeesApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/PayeesApi.scala index 386337d51a..335b82fc8c 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/PayeesApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/PayeesApi.scala @@ -48,7 +48,7 @@ object APIMethods_PayeesApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Payees") :: apiTagMockedData :: Nil ) @@ -56,7 +56,7 @@ object APIMethods_PayeesApi extends RestHelper { case "banking":: "payees" :: payeeId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -109,7 +109,7 @@ object APIMethods_PayeesApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Payees") :: apiTagMockedData :: Nil ) @@ -117,7 +117,7 @@ object APIMethods_PayeesApi extends RestHelper { case "banking":: "payees" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ProductsApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ProductsApi.scala index 646eed5d37..04d227672f 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ProductsApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ProductsApi.scala @@ -47,7 +47,7 @@ object APIMethods_ProductsApi extends RestHelper { "self" : "self" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Products") :: apiTagMockedData :: Nil ) @@ -55,7 +55,7 @@ object APIMethods_ProductsApi extends RestHelper { case "banking":: "products" :: productId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : "", @@ -176,7 +176,7 @@ In addition, the concept of effective date and time has also been included. This "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Products") :: apiTagMockedData :: Nil ) @@ -184,7 +184,7 @@ In addition, the concept of effective date and time has also been included. This case "banking":: "products" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ScheduledPaymentsApi.scala b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ScheduledPaymentsApi.scala index 289c43eff8..037447e0c4 100644 --- a/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ScheduledPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/AUOpenBanking/v1_0_0/ScheduledPaymentsApi.scala @@ -338,7 +338,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -346,7 +346,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { case "banking":: "accounts" :: accountId:: "payments":: "scheduled" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -956,7 +956,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -964,7 +964,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { case "banking":: "payments":: "scheduled" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { @@ -1579,7 +1579,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { "first" : "first" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Banking") ::ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -1587,7 +1587,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { case "banking":: "payments":: "scheduled" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "data" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountAccessConsentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountAccessConsentsApi.scala index 0bfaa75264..450c57c03f 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountAccessConsentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountAccessConsentsApi.scala @@ -62,7 +62,7 @@ object APIMethods_AccountAccessConsentsApi extends RestHelper { "TransactionFromDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Access Consents") :: apiTagMockedData :: Nil ) @@ -70,7 +70,7 @@ object APIMethods_AccountAccessConsentsApi extends RestHelper { case "account-access-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -135,7 +135,7 @@ object APIMethods_AccountAccessConsentsApi extends RestHelper { "TransactionFromDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Access Consents") :: apiTagMockedData :: Nil ) @@ -143,7 +143,7 @@ object APIMethods_AccountAccessConsentsApi extends RestHelper { case "account-access-consents" :: consentId :: Nil JsonPatch _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -210,7 +210,7 @@ object APIMethods_AccountAccessConsentsApi extends RestHelper { "TransactionFromDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Access Consents") :: apiTagMockedData :: Nil ) @@ -218,7 +218,7 @@ object APIMethods_AccountAccessConsentsApi extends RestHelper { case "account-access-consents" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountsApi.scala index aca6e29c03..e48bafcf2d 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/AccountsApi.scala @@ -55,7 +55,7 @@ object APIMethods_AccountsApi extends RestHelper { "Account" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -63,7 +63,7 @@ object APIMethods_AccountsApi extends RestHelper { case "accounts" :: accountId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -112,7 +112,7 @@ object APIMethods_AccountsApi extends RestHelper { "Account" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Accounts") :: apiTagMockedData :: Nil ) @@ -120,7 +120,7 @@ object APIMethods_AccountsApi extends RestHelper { case "accounts" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BalancesApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BalancesApi.scala index 6dfe3ce89e..39bf856d39 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BalancesApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BalancesApi.scala @@ -91,7 +91,7 @@ object APIMethods_BalancesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Balances") :: apiTagMockedData :: Nil ) @@ -99,7 +99,7 @@ object APIMethods_BalancesApi extends RestHelper { case "accounts" :: accountId:: "balances" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -220,7 +220,7 @@ object APIMethods_BalancesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Balances") :: apiTagMockedData :: Nil ) @@ -228,7 +228,7 @@ object APIMethods_BalancesApi extends RestHelper { case "balances" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BeneficiariesApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BeneficiariesApi.scala index c10d058b4c..9a0f9aceed 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BeneficiariesApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/BeneficiariesApi.scala @@ -55,7 +55,7 @@ object APIMethods_BeneficiariesApi extends RestHelper { "Beneficiary" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Beneficiaries") :: apiTagMockedData :: Nil ) @@ -63,7 +63,7 @@ object APIMethods_BeneficiariesApi extends RestHelper { case "accounts" :: accountId:: "beneficiaries" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -112,7 +112,7 @@ object APIMethods_BeneficiariesApi extends RestHelper { "Beneficiary" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Beneficiaries") :: apiTagMockedData :: Nil ) @@ -120,7 +120,7 @@ object APIMethods_BeneficiariesApi extends RestHelper { case "beneficiaries" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DirectDebitsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DirectDebitsApi.scala index 99e23cf40a..5fdc57f2b5 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DirectDebitsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DirectDebitsApi.scala @@ -81,7 +81,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -89,7 +89,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { case "accounts" :: accountId:: "direct-debits" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -190,7 +190,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -198,7 +198,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { case "direct-debits" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentConsentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentConsentsApi.scala index b529269150..182976b65b 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentConsentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentConsentsApi.scala @@ -65,7 +65,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payment Consents") :: apiTagMockedData :: Nil ) @@ -73,7 +73,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { case "domestic-future-dated-payment-cancellation-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Data" : { @@ -145,7 +145,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payment Consents") :: apiTagMockedData :: Nil ) @@ -153,7 +153,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { case "domestic-future-dated-payment-cancellation-consents" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Data" : { @@ -290,7 +290,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payment Consents") :: apiTagMockedData :: Nil ) @@ -298,7 +298,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { case "domestic-future-dated-payment-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -566,7 +566,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payment Consents") :: apiTagMockedData :: Nil ) @@ -574,7 +574,7 @@ object APIMethods_DomesticFutureDatedPaymentConsentsApi extends RestHelper { case "domestic-future-dated-payment-consents" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentsApi.scala index 97340d0a35..24799c52ac 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticFutureDatedPaymentsApi.scala @@ -123,7 +123,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payments") :: apiTagMockedData :: Nil ) @@ -131,7 +131,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { case "domestic-future-dated-payments" :: domesticFutureDatedPaymentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -317,7 +317,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payments") :: apiTagMockedData :: Nil ) @@ -325,7 +325,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { case "domestic-future-dated-payments" :: domesticFutureDatedPaymentId :: Nil JsonPatch _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -460,7 +460,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payments") :: apiTagMockedData :: Nil ) @@ -468,7 +468,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { case "domestic-future-dated-payments" :: domesticFutureDatedPaymentId:: "payment-details" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -652,7 +652,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Future Dated Payments") :: apiTagMockedData :: Nil ) @@ -660,7 +660,7 @@ object APIMethods_DomesticFutureDatedPaymentsApi extends RestHelper { case "domestic-future-dated-payments" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsApi.scala index 3491ae02da..26b4ec4bed 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsApi.scala @@ -121,7 +121,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -129,7 +129,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { case "domestic-payments" :: domesticPaymentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -263,7 +263,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -271,7 +271,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { case "domestic-payments" :: domesticPaymentId:: "payment-details" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -453,7 +453,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -461,7 +461,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { case "domestic-payments" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsConsentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsConsentsApi.scala index 8b03e9e4a7..9a6c8dbe09 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsConsentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/DomesticPaymentsConsentsApi.scala @@ -60,7 +60,7 @@ object APIMethods_DomesticPaymentsConsentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments Consents") :: apiTagMockedData :: Nil ) @@ -68,7 +68,7 @@ object APIMethods_DomesticPaymentsConsentsApi extends RestHelper { case "domestic-payment-consents" :: consentId:: "funds-confirmation" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -199,7 +199,7 @@ object APIMethods_DomesticPaymentsConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments Consents") :: apiTagMockedData :: Nil ) @@ -207,7 +207,7 @@ object APIMethods_DomesticPaymentsConsentsApi extends RestHelper { case "domestic-payment-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -469,7 +469,7 @@ object APIMethods_DomesticPaymentsConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments Consents") :: apiTagMockedData :: Nil ) @@ -477,7 +477,7 @@ object APIMethods_DomesticPaymentsConsentsApi extends RestHelper { case "domestic-payment-consents" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/EventNotificationApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/EventNotificationApi.scala index 244088bda4..3045884ef6 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/EventNotificationApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/EventNotificationApi.scala @@ -94,7 +94,7 @@ object APIMethods_EventNotificationApi extends RestHelper { "jti" : "jti" }"""), json.parse(""""""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Event Notification") :: apiTagMockedData :: Nil ) @@ -102,7 +102,7 @@ object APIMethods_EventNotificationApi extends RestHelper { case "event-notifications" :: Nil JsonPost _ => { cc => implicit val ec = EndpointContext(Some(cc)) for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse(""""""), callContext) } diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentConsentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentConsentsApi.scala index 8226770618..38e2ee641e 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentConsentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentConsentsApi.scala @@ -42,7 +42,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { """, json.parse(""""""), json.parse("""{ }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payment Consents") :: apiTagMockedData :: Nil ) @@ -50,7 +50,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { case "file-payment-consents" :: consentId:: "file" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ }"""), callContext) } @@ -69,7 +69,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { """, json.parse("""{ }"""), json.parse(""""""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payment Consents") :: apiTagMockedData :: Nil ) @@ -77,7 +77,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { case "file-payment-consents" :: consentId:: "file" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse(""""""), callContext) } @@ -159,7 +159,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payment Consents") :: apiTagMockedData :: Nil ) @@ -167,7 +167,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { case "file-payment-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -341,7 +341,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payment Consents") :: apiTagMockedData :: Nil ) @@ -349,7 +349,7 @@ object APIMethods_FilePaymentConsentsApi extends RestHelper { case "file-payment-consents" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentsApi.scala index 166234039d..1c2a026a04 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FilePaymentsApi.scala @@ -96,7 +96,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -104,7 +104,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { case "file-payments" :: filePaymentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -212,7 +212,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -220,7 +220,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { case "file-payments" :: filePaymentId:: "payment-details" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -274,7 +274,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { """, json.parse(""""""), json.parse("""{ }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -282,7 +282,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { case "file-payments" :: filePaymentId:: "report-file" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ }"""), callContext) } @@ -376,7 +376,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -384,7 +384,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { case "file-payments" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FutureDatedPaymentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FutureDatedPaymentsApi.scala index bd2958efba..be891acd89 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FutureDatedPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/FutureDatedPaymentsApi.scala @@ -55,7 +55,7 @@ object APIMethods_FutureDatedPaymentsApi extends RestHelper { "FutureDatedPayment" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Future Dated Payments") :: apiTagMockedData :: Nil ) @@ -63,7 +63,7 @@ object APIMethods_FutureDatedPaymentsApi extends RestHelper { case "accounts" :: accountId:: "future-dated-payments" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -112,7 +112,7 @@ object APIMethods_FutureDatedPaymentsApi extends RestHelper { "FutureDatedPayment" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Future Dated Payments") :: apiTagMockedData :: Nil ) @@ -120,7 +120,7 @@ object APIMethods_FutureDatedPaymentsApi extends RestHelper { case "future-dated-payments" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentConsentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentConsentsApi.scala index f5c2376895..a194292b04 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentConsentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentConsentsApi.scala @@ -60,7 +60,7 @@ object APIMethods_InternationalPaymentConsentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payment Consents") :: apiTagMockedData :: Nil ) @@ -68,7 +68,7 @@ object APIMethods_InternationalPaymentConsentsApi extends RestHelper { case "international-payment-consents" :: consentId:: "funds-confirmation" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -238,7 +238,7 @@ object APIMethods_InternationalPaymentConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payment Consents") :: apiTagMockedData :: Nil ) @@ -246,7 +246,7 @@ object APIMethods_InternationalPaymentConsentsApi extends RestHelper { case "international-payment-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -618,7 +618,7 @@ object APIMethods_InternationalPaymentConsentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payment Consents") :: apiTagMockedData :: Nil ) @@ -626,7 +626,7 @@ object APIMethods_InternationalPaymentConsentsApi extends RestHelper { case "international-payment-consents" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentsApi.scala index a566e2bb14..b91652f7cd 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/InternationalPaymentsApi.scala @@ -192,7 +192,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -200,7 +200,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { case "international-payments" :: internationalPaymentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -405,7 +405,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -413,7 +413,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { case "international-payments" :: internationalPaymentId:: "payment-details" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -698,7 +698,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -706,7 +706,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { case "international-payments" :: Nil JsonPost _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/OffersApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/OffersApi.scala index 1fb6ba9ee1..38d21e8649 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/OffersApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/OffersApi.scala @@ -87,7 +87,7 @@ object APIMethods_OffersApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Offers") :: apiTagMockedData :: Nil ) @@ -95,7 +95,7 @@ object APIMethods_OffersApi extends RestHelper { case "accounts" :: accountId:: "offers" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -208,7 +208,7 @@ object APIMethods_OffersApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Offers") :: apiTagMockedData :: Nil ) @@ -216,7 +216,7 @@ object APIMethods_OffersApi extends RestHelper { case "offers" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/PartiesApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/PartiesApi.scala index 1e5ab3666f..d2d4a15756 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/PartiesApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/PartiesApi.scala @@ -130,7 +130,7 @@ object APIMethods_PartiesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Parties") :: apiTagMockedData :: Nil ) @@ -138,7 +138,7 @@ object APIMethods_PartiesApi extends RestHelper { case "accounts" :: accountId:: "parties" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -298,7 +298,7 @@ object APIMethods_PartiesApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Parties") :: apiTagMockedData :: Nil ) @@ -306,7 +306,7 @@ object APIMethods_PartiesApi extends RestHelper { case "accounts" :: accountId:: "party" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -429,7 +429,7 @@ object APIMethods_PartiesApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Parties") :: apiTagMockedData :: Nil ) @@ -437,7 +437,7 @@ object APIMethods_PartiesApi extends RestHelper { case "party" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StandingOrdersApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StandingOrdersApi.scala index d3722d3955..e352843f1e 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StandingOrdersApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StandingOrdersApi.scala @@ -55,7 +55,7 @@ object APIMethods_StandingOrdersApi extends RestHelper { "StandingOrder" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Standing Orders") :: apiTagMockedData :: Nil ) @@ -63,7 +63,7 @@ object APIMethods_StandingOrdersApi extends RestHelper { case "accounts" :: accountId:: "standing-orders" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -112,7 +112,7 @@ object APIMethods_StandingOrdersApi extends RestHelper { "StandingOrder" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Standing Orders") :: apiTagMockedData :: Nil ) @@ -120,7 +120,7 @@ object APIMethods_StandingOrdersApi extends RestHelper { case "standing-orders" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StatementsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StatementsApi.scala index aaa6102cd6..0c18ccd471 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StatementsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/StatementsApi.scala @@ -58,7 +58,7 @@ object APIMethods_StatementsApi extends RestHelper { "Statement" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -66,7 +66,7 @@ object APIMethods_StatementsApi extends RestHelper { case "accounts" :: accountId:: "statements" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -100,7 +100,7 @@ object APIMethods_StatementsApi extends RestHelper { """, json.parse(""""""), json.parse("""{ }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -108,7 +108,7 @@ object APIMethods_StatementsApi extends RestHelper { case "accounts" :: accountId:: "statements" :: statementId:: "file" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ }"""), callContext) } @@ -142,7 +142,7 @@ object APIMethods_StatementsApi extends RestHelper { "Statement" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -150,7 +150,7 @@ object APIMethods_StatementsApi extends RestHelper { case "accounts" :: accountId:: "statements" :: statementId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -199,7 +199,7 @@ object APIMethods_StatementsApi extends RestHelper { "Transaction" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -207,7 +207,7 @@ object APIMethods_StatementsApi extends RestHelper { case "accounts" :: accountId:: "statements" :: statementId:: "transactions" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -256,7 +256,7 @@ object APIMethods_StatementsApi extends RestHelper { "Statement" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -264,7 +264,7 @@ object APIMethods_StatementsApi extends RestHelper { case "statements" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/SupplementaryAccountInfoApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/SupplementaryAccountInfoApi.scala index d4dec4f4de..534554f2b5 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/SupplementaryAccountInfoApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/SupplementaryAccountInfoApi.scala @@ -78,7 +78,7 @@ object APIMethods_SupplementaryAccountInfoApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Supplementary Account Info") :: apiTagMockedData :: Nil ) @@ -86,7 +86,7 @@ object APIMethods_SupplementaryAccountInfoApi extends RestHelper { case "accounts" :: accountId:: "supplementary-account-info" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Data" : { diff --git a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/TransactionsApi.scala b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/TransactionsApi.scala index 12c2cf3d3d..fbd6467cb5 100644 --- a/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/TransactionsApi.scala +++ b/obp-api/src/main/scala/code/api/BahrainOBF/v1_0_0/TransactionsApi.scala @@ -55,7 +55,7 @@ object APIMethods_TransactionsApi extends RestHelper { "Transaction" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Transactions") :: apiTagMockedData :: Nil ) @@ -63,7 +63,7 @@ object APIMethods_TransactionsApi extends RestHelper { case "accounts" :: accountId:: "transactions" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { @@ -112,7 +112,7 @@ object APIMethods_TransactionsApi extends RestHelper { "Transaction" : [ { }, { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Transactions") :: apiTagMockedData :: Nil ) @@ -120,7 +120,7 @@ object APIMethods_TransactionsApi extends RestHelper { case "transactions" :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) } yield { (json.parse("""{ "Meta" : { diff --git a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala index 82b4965c04..0cabab029e 100644 --- a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala +++ b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala @@ -49,7 +49,7 @@ Removes consent""", "consentId" : "consentId" }"""), EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -106,7 +106,7 @@ User identification based on access token""", "availableBalance" : "availableBalance" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -189,7 +189,7 @@ User identification based on access token""", "accountNumber" : "accountNumber" } ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -251,7 +251,7 @@ User identification based on access token""", }, "holds" : [ "", "" ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -344,7 +344,7 @@ User identification based on access token""", "amountBaseCurrency" : "amountBaseCurrency", "tppName" : "tppName" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -432,7 +432,7 @@ User identification based on access token""", }, "transactions" : [ "", "" ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -480,7 +480,7 @@ User identification based on access token""", }, "transactions" : [ "", "" ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -528,7 +528,7 @@ User identification based on access token""", }, "transactions" : [ "", "" ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -576,7 +576,7 @@ User identification based on access token""", }, "transactions" : [ "", "" ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) @@ -624,7 +624,7 @@ User identification based on access token""", }, "transactions" : [ "", "" ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AIS") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala index 51c0488e0c..e9af8fc1c1 100644 --- a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala +++ b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala @@ -927,7 +927,7 @@ Requests OAuth2 authorization code""", }, "aspspRedirectUri" : "aspspRedirectUri" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AS") :: apiTagMockedData :: Nil ) @@ -1844,7 +1844,7 @@ Requests OAuth2 authorization code based One-time authorization code issued by E "client_id" : "client_id" }"""), EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AS") :: apiTagMockedData :: Nil ) @@ -2820,7 +2820,7 @@ Requests OAuth2 access token value""", "token_type" : "token_type", "expires_in" : "expires_in" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AS") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala index a23d8151a9..96792a58a8 100644 --- a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala +++ b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala @@ -56,7 +56,7 @@ Confirming the availability on the payers account of the amount necessary to exe "isCallback" : true } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("CAF") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala index 079d300303..6a21cedf7f 100644 --- a/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala +++ b/obp-api/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala @@ -253,7 +253,7 @@ object APIMethods_PISApi extends RestHelper { "bundleDetailedStatus" : "bundleDetailedStatus", "bundleStatus" : "inProgress" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -314,7 +314,7 @@ object APIMethods_PISApi extends RestHelper { "executionMode" : "Immediate" } ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -367,7 +367,7 @@ object APIMethods_PISApi extends RestHelper { "recurringPaymentStatus" : "submitted", "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -430,7 +430,7 @@ object APIMethods_PISApi extends RestHelper { "isCallback" : true } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -493,7 +493,7 @@ object APIMethods_PISApi extends RestHelper { "isCallback" : true } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -556,7 +556,7 @@ object APIMethods_PISApi extends RestHelper { "bundleDetailedStatus" : "bundleDetailedStatus", "bundleStatus" : "inProgress" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -641,7 +641,7 @@ object APIMethods_PISApi extends RestHelper { "isCallback" : true } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -690,7 +690,7 @@ object APIMethods_PISApi extends RestHelper { "requestHeader" : "" }"""), json.parse(""""""""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -730,7 +730,7 @@ object APIMethods_PISApi extends RestHelper { "recurringPaymentStatus" : "submitted", "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -802,7 +802,7 @@ object APIMethods_PISApi extends RestHelper { "isCallback" : true } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -948,7 +948,7 @@ object APIMethods_PISApi extends RestHelper { "recurringPaymentStatus" : "submitted", "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) @@ -1025,7 +1025,7 @@ object APIMethods_PISApi extends RestHelper { "isCallback" : true } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PIS") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/OpenAPI31JSONFactory.scala b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/OpenAPI31JSONFactory.scala index 5a42e13631..f2e7391663 100644 --- a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/OpenAPI31JSONFactory.scala +++ b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/OpenAPI31JSONFactory.scala @@ -652,7 +652,7 @@ object OpenAPI31JSONFactory extends MdcLoggable { * Determines if an endpoint requires authentication */ private def requiresAuthentication(doc: ResourceDocJson): Boolean = { - doc.error_response_bodies.exists(_.contains("UserNotLoggedIn")) || + doc.error_response_bodies.exists(_.contains("AuthenticatedUserIsRequired")) || doc.roles.nonEmpty || doc.description.toLowerCase.contains("authentication is required") || doc.description.toLowerCase.contains("user must be logged in") diff --git a/obp-api/src/main/scala/code/api/STET/v1_4/AISPApi.scala b/obp-api/src/main/scala/code/api/STET/v1_4/AISPApi.scala index 7eeb835abe..dbe0751722 100644 --- a/obp-api/src/main/scala/code/api/STET/v1_4/AISPApi.scala +++ b/obp-api/src/main/scala/code/api/STET/v1_4/AISPApi.scala @@ -101,7 +101,7 @@ The ASPSP answers by providing a list of balances on this account. | } |} |""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AISP") :: Nil ) @@ -190,7 +190,7 @@ The TPP sends a request to the ASPSP for retrieving the list of the PSU payment | } | } |}""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AISP") :: Nil ) @@ -282,7 +282,7 @@ The AISP requests the ASPSP on one of the PSU's accounts. It may specify some se | } | } |}""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AISP") :: Nil ) @@ -358,7 +358,7 @@ The PSU specifies to the AISP which of his/her accounts will be accessible and w "psuIdentity" : true }"""), EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AISP") :: apiTagMockedData :: Nil ) @@ -400,7 +400,7 @@ The AISP asks for the identity of the PSU. The ASPSP answers with the identity, """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AISP") :: apiTagMockedData :: Nil ) @@ -442,7 +442,7 @@ The AISP asks for the trusted beneficiaries list. The ASPSP answers with a list """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("AISP") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala b/obp-api/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala index 7c64f54ee9..5b8e4ffa40 100644 --- a/obp-api/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala +++ b/obp-api/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala @@ -62,7 +62,7 @@ The CBPII requests the ASPSP for a payment coverage check against either a bank } }"""), EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("CBPII") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/STET/v1_4/PISPApi.scala b/obp-api/src/main/scala/code/api/STET/v1_4/PISPApi.scala index 8dde01b430..64b7b94009 100644 --- a/obp-api/src/main/scala/code/api/STET/v1_4/PISPApi.scala +++ b/obp-api/src/main/scala/code/api/STET/v1_4/PISPApi.scala @@ -66,7 +66,7 @@ In REDIRECT and DECOUPLED approach, this confirmation is not a prerequisite to t "psuAuthenticationFactor" : "JJKJKJ788GKJKJBK" }"""), EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PISP") :: apiTagMockedData :: Nil ) @@ -216,7 +216,7 @@ Since the modification request needs a PSU authentication before committing, the } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PISP") :: apiTagMockedData :: Nil ) @@ -281,7 +281,7 @@ The status information must be available during at least 30 calendar days after """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PISP") :: apiTagMockedData :: Nil ) @@ -523,7 +523,7 @@ When the chosen authentication approach within the ASPSP answers is set to "EMBE } }"""), EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("PISP") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala index 93439d2edd..f18c3185c2 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala @@ -4,7 +4,7 @@ import code.api.APIFailureNewStyle import code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON import code.api.util.APIUtil._ import code.api.util.ApiTag._ -import code.api.util.ErrorMessages.{InvalidConnectorResponseForGetTransactionRequests210, UnknownError, UserNotLoggedIn, _} +import code.api.util.ErrorMessages.{InvalidConnectorResponseForGetTransactionRequests210, UnknownError, AuthenticatedUserIsRequired, _} import code.api.util.newstyle.ViewNewStyle import code.api.util.{ErrorMessages, NewStyle} import code.bankconnectors.Connector @@ -43,7 +43,7 @@ object APIMethods_UKOpenBanking_200 extends RestHelper{ |""", EmptyBody, SwaggerDefinitionsJSON.accountsJsonUKOpenBanking_v200, - List(ErrorMessages.UserNotLoggedIn,ErrorMessages.UnknownError), + List(ErrorMessages.AuthenticatedUserIsRequired,ErrorMessages.UnknownError), List(apiTagUKOpenBanking, apiTagAccount, apiTagPrivateData)) apiRelations += ApiRelation(getAccountList, getAccountList, "self") @@ -77,7 +77,7 @@ object APIMethods_UKOpenBanking_200 extends RestHelper{ |""", EmptyBody, SwaggerDefinitionsJSON.transactionsJsonUKV200, - List(UserNotLoggedIn,UnknownError), + List(AuthenticatedUserIsRequired,UnknownError), List(apiTagUKOpenBanking, apiTagTransaction, apiTagPrivateData, apiTagPsd2)) lazy val getAccountTransactions : OBPEndpoint = { @@ -127,7 +127,7 @@ object APIMethods_UKOpenBanking_200 extends RestHelper{ |""", EmptyBody, SwaggerDefinitionsJSON.accountsJsonUKOpenBanking_v200, - List(ErrorMessages.UserNotLoggedIn,ErrorMessages.UnknownError), + List(ErrorMessages.AuthenticatedUserIsRequired,ErrorMessages.UnknownError), List(apiTagUKOpenBanking, apiTagAccount, apiTagPrivateData)) apiRelations += ApiRelation(getAccount, getAccount, "self") @@ -165,7 +165,7 @@ object APIMethods_UKOpenBanking_200 extends RestHelper{ |""", EmptyBody, SwaggerDefinitionsJSON.accountBalancesUKV200, - List(ErrorMessages.UserNotLoggedIn,ErrorMessages.UnknownError), + List(ErrorMessages.AuthenticatedUserIsRequired,ErrorMessages.UnknownError), List(apiTagUKOpenBanking, apiTagAccount, apiTagPrivateData)) lazy val getAccountBalances : OBPEndpoint = { @@ -210,7 +210,7 @@ object APIMethods_UKOpenBanking_200 extends RestHelper{ |""", EmptyBody, SwaggerDefinitionsJSON.accountBalancesUKV200, - List(ErrorMessages.UserNotLoggedIn,ErrorMessages.UnknownError), + List(ErrorMessages.AuthenticatedUserIsRequired,ErrorMessages.UnknownError), List(apiTagUKOpenBanking, apiTagAccount, apiTagPrivateData)) lazy val getBalances : OBPEndpoint = { diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala index 2221a08cb9..27a5047a44 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala @@ -79,7 +79,7 @@ object APIMethods_AccountAccessApi extends RestHelper { "LastAvailableDateTime": "2020-10-20T08:40:47.375Z" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Access") :: Nil ) @@ -149,7 +149,7 @@ object APIMethods_AccountAccessApi extends RestHelper { |""".stripMargin, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Access") :: Nil ) @@ -157,7 +157,7 @@ object APIMethods_AccountAccessApi extends RestHelper { case "account-access-consents" :: consentId :: Nil JsonDelete _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) _ <- passesPsd2Aisp(callContext) consent <- Future(Consents.consentProvider.vend.getConsentByConsentId(consentId)) map { unboxFullOrFail(_, callContext, ConsentNotFound) @@ -206,7 +206,7 @@ object APIMethods_AccountAccessApi extends RestHelper { "LastAvailableDateTime": "2020-10-20T10:28:39.801Z" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Access") :: Nil ) @@ -214,7 +214,7 @@ object APIMethods_AccountAccessApi extends RestHelper { case "account-access-consents" :: consentId :: Nil JsonGet _ => { cc => for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) consent <- Future(Consents.consentProvider.vend.getConsentByConsentId(consentId)) map { unboxFullOrFail(_, callContext, s"$ConsentNotFound ($consentId)") } diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala index af76a559f0..2b2c3eddd3 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala @@ -100,7 +100,7 @@ object APIMethods_AccountsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Accounts") :: Nil ) @@ -110,7 +110,7 @@ object APIMethods_AccountsApi extends RestHelper { val detailViewId = ViewId(Constant.SYSTEM_READ_ACCOUNTS_DETAIL_VIEW_ID) val basicViewId = ViewId(Constant.SYSTEM_READ_ACCOUNTS_BASIC_VIEW_ID) for { - (Full(u), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(u), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) _ <- NewStyle.function.checkUKConsent(u, callContext) _ <- passesPsd2Aisp(callContext) availablePrivateAccounts <- Views.views.vend.getPrivateBankAccountsFuture(u) @@ -207,7 +207,7 @@ object APIMethods_AccountsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Accounts") :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala index 7f5196a241..feb7956c6c 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala @@ -103,7 +103,7 @@ object APIMethods_BalancesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Balances") :: Nil ) @@ -112,7 +112,7 @@ object APIMethods_BalancesApi extends RestHelper { cc => val viewId = ViewId(Constant.SYSTEM_READ_BALANCES_VIEW_ID) for { - (Full(user), callContext) <- authenticatedAccess(cc, UserNotLoggedIn) + (Full(user), callContext) <- authenticatedAccess(cc, AuthenticatedUserIsRequired) _ <- NewStyle.function.checkUKConsent(user, callContext) _ <- passesPsd2Aisp(callContext) (account, callContext) <- NewStyle.function.getBankAccountByAccountId(accountId, callContext) @@ -197,7 +197,7 @@ object APIMethods_BalancesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Balances") :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala index a8bdf4a6fa..07919dda5d 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala @@ -108,7 +108,7 @@ object APIMethods_BeneficiariesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Beneficiaries") :: apiTagMockedData :: Nil ) @@ -272,7 +272,7 @@ object APIMethods_BeneficiariesApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Beneficiaries") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala index 691d74797b..6dd920ace6 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala @@ -76,7 +76,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) @@ -176,7 +176,7 @@ object APIMethods_DirectDebitsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Direct Debits") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala index 26c9f7441c..6d32805b57 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala @@ -133,7 +133,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -330,7 +330,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -527,7 +527,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -663,7 +663,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) @@ -788,7 +788,7 @@ object APIMethods_DomesticPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Payments") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala index 8a9c8fdf4c..1d3697e004 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala @@ -134,7 +134,7 @@ object APIMethods_DomesticScheduledPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -334,7 +334,7 @@ object APIMethods_DomesticScheduledPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -534,7 +534,7 @@ object APIMethods_DomesticScheduledPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -734,7 +734,7 @@ object APIMethods_DomesticScheduledPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala index 9af02bff7c..32f5f229e8 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala @@ -125,7 +125,7 @@ object APIMethods_DomesticStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil ) @@ -307,7 +307,7 @@ object APIMethods_DomesticStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil ) @@ -489,7 +489,7 @@ object APIMethods_DomesticStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil ) @@ -671,7 +671,7 @@ object APIMethods_DomesticStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala index ff17971f8f..88e72483a5 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala @@ -102,7 +102,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -186,7 +186,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -273,7 +273,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -418,7 +418,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -502,7 +502,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -589,7 +589,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) @@ -676,7 +676,7 @@ object APIMethods_FilePaymentsApi extends RestHelper { """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("File Payments") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala index 61d110fb43..a97776eeff 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala @@ -66,7 +66,7 @@ object APIMethods_FundsConfirmationsApi extends RestHelper { "ConsentId" : "ConsentId" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil ) @@ -140,7 +140,7 @@ object APIMethods_FundsConfirmationsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil ) @@ -189,7 +189,7 @@ object APIMethods_FundsConfirmationsApi extends RestHelper { """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil ) @@ -240,7 +240,7 @@ object APIMethods_FundsConfirmationsApi extends RestHelper { "ConsentId" : "ConsentId" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala index 4902fc0c8d..dc2db414a5 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala @@ -169,7 +169,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -438,7 +438,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -707,7 +707,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -879,7 +879,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) @@ -1040,7 +1040,7 @@ object APIMethods_InternationalPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Payments") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala index 7dd09f027e..05070bb0df 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala @@ -171,7 +171,7 @@ object APIMethods_InternationalScheduledPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -443,7 +443,7 @@ object APIMethods_InternationalScheduledPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -715,7 +715,7 @@ object APIMethods_InternationalScheduledPaymentsApi extends RestHelper { "ExpectedSettlementDateTime" : "2000-01-23T04:56:07.000+00:00" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -889,7 +889,7 @@ object APIMethods_InternationalScheduledPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -1051,7 +1051,7 @@ object APIMethods_InternationalScheduledPaymentsApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala index f35323886d..8735d6c6c6 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala @@ -152,7 +152,7 @@ object APIMethods_InternationalStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Standing Orders") :: apiTagMockedData :: Nil ) @@ -388,7 +388,7 @@ object APIMethods_InternationalStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Standing Orders") :: apiTagMockedData :: Nil ) @@ -624,7 +624,7 @@ object APIMethods_InternationalStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Standing Orders") :: apiTagMockedData :: Nil ) @@ -860,7 +860,7 @@ object APIMethods_InternationalStandingOrdersApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("International Standing Orders") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala index 953810052e..56b1ad4081 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala @@ -92,7 +92,7 @@ object APIMethods_OffersApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Offers") :: apiTagMockedData :: Nil ) @@ -224,7 +224,7 @@ object APIMethods_OffersApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Offers") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala index 4a8c43e583..f5222be85e 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala @@ -81,7 +81,7 @@ object APIMethods_PartysApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Partys") :: apiTagMockedData :: Nil ) @@ -191,7 +191,7 @@ object APIMethods_PartysApi extends RestHelper { } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Partys") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala index 4542578c98..49f24147a8 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala @@ -38,7 +38,7 @@ object APIMethods_ProductsApi extends RestHelper { s"""${mockedDataText(true)}""", EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Products") :: apiTagMockedData :: Nil ) @@ -64,7 +64,7 @@ object APIMethods_ProductsApi extends RestHelper { """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Products") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala index 826fd9d8d1..b5e0bf1703 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala @@ -94,7 +94,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) @@ -230,7 +230,7 @@ object APIMethods_ScheduledPaymentsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala index f447695250..4dc1409f00 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala @@ -118,7 +118,7 @@ object APIMethods_StandingOrdersApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Standing Orders") :: apiTagMockedData :: Nil ) @@ -302,7 +302,7 @@ object APIMethods_StandingOrdersApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Standing Orders") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala index 66be44423a..0ec509d248 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala @@ -233,7 +233,7 @@ object APIMethods_StatementsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -641,7 +641,7 @@ object APIMethods_StatementsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -858,7 +858,7 @@ object APIMethods_StatementsApi extends RestHelper { """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) @@ -1107,7 +1107,7 @@ object APIMethods_StatementsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") ::ApiTag("Transactions") :: apiTagMockedData :: Nil ) @@ -1547,7 +1547,7 @@ object APIMethods_StatementsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") :: apiTagMockedData :: Nil ) diff --git a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala index 3b1f0e8b12..924cfa0b8a 100644 --- a/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala +++ b/obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala @@ -270,7 +270,7 @@ object APIMethods_TransactionsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Statements") ::ApiTag("Transactions") :: apiTagMockedData :: Nil ) @@ -743,7 +743,7 @@ object APIMethods_TransactionsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Transactions") :: Nil ) @@ -1010,7 +1010,7 @@ object APIMethods_TransactionsApi extends RestHelper { } ] } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Transactions") :: Nil ) 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 df55fbfd01..bee7519aa4 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 @@ -140,7 +140,7 @@ recurringIndicator: consentStatus = "received", _links = ConsentLinksV13(Some(Href("/v1.3/consents/1234-wertiq-983/authorisations"))) ), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -253,7 +253,7 @@ recurringIndicator: The TPP can delete an account information consent object if needed.""", EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -336,7 +336,7 @@ of the PSU at this ASPSP. | } | ] |}""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -414,7 +414,7 @@ The account-id is constant at least throughout the lifecycle of a given consent. }] } """), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -472,7 +472,7 @@ respectively the OAuth2 access token. } ] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagMockedData :: Nil ) @@ -542,7 +542,7 @@ This account-id then can be retrieved by the "referenceDate":"2018-03-08" }] }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: Nil ) @@ -631,7 +631,7 @@ Reads account data from a given card account addressed by "account-id". } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM ::Nil ) @@ -677,7 +677,7 @@ This function returns an array of hyperlinks to all generated authorisation sub- json.parse("""{ "authorisationIds" : "faa3657e-13f0-4feb-a6c3-34bf21a9ae8e" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -735,7 +735,7 @@ where the consent was directly managed between ASPSP and PSU e.g. in a re-direct "lastActionDate": "2019-06-30", "consentStatus": "received" }"""), - List(UserNotLoggedIn, ConsentNotFound, UnknownError), + List(AuthenticatedUserIsRequired, ConsentNotFound, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -774,7 +774,7 @@ This method returns the SCA status of a consent initiation's authorisation sub-r json.parse("""{ "scaStatus" : "started" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -809,7 +809,7 @@ This method returns the SCA status of a consent initiation's authorisation sub-r json.parse("""{ "consentStatus": "received" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -867,7 +867,7 @@ of the "Read Transaction List" call within the _links subfield. } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: Nil ) @@ -959,7 +959,7 @@ The ASPSP might add balance information, if transaction lists without balances a } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1028,7 +1028,7 @@ Give detailed information about the addressed account together with balance info } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1102,7 +1102,7 @@ respectively the OAuth2 access token. | } | } |}""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: Nil ) @@ -1185,7 +1185,7 @@ using the extended forms as indicated above. "scaStatus": {"href":"/v1.3/consents/qwer3456tzui7890/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1240,7 +1240,7 @@ using the extended forms as indicated above. "scaStatus": {"href":"/v1.3/consents/qwer3456tzui7890/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1282,7 +1282,7 @@ using the extended forms as indicated above. "scaStatus": {"href":"/v1.3/consents/qwer3456tzui7890/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1348,7 +1348,7 @@ Maybe in a later version the access path will change. scaStatus = "received", _links = Some(LinksAll(scaStatus = Some(HrefType(Some(s"/v1.3/consents/1234-wertiq-983/authorisations"))))) ), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1417,7 +1417,7 @@ Maybe in a later version the access path will change. | "authoriseTransaction": {"href": "/psd2/v1/payments/1234-wertiq-983/authorisations/123auth456"} | } | }""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1462,7 +1462,7 @@ Maybe in a later version the access path will change. | "authoriseTransaction": {"href": "/psd2/v1/payments/1234-wertiq-983/authorisations/123auth456"} | } | }""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1505,7 +1505,7 @@ Maybe in a later version the access path will change. | "status": {"href":"/v1/payments/sepa-credit-transfers/qwer3456tzui7890/status"} | } | }""".stripMargin), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil ) diff --git a/obp-api/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala b/obp-api/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala index adde2f1fb6..6a2bf7f41d 100644 --- a/obp-api/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala +++ b/obp-api/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala @@ -58,7 +58,7 @@ in the header. This field is contained but commented out in this specification. """{ "fundsAvailable" : true }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Confirmation of Funds Service (PIIS)") :: apiTagBerlinGroupM :: Nil ) 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 ac26183268..f46477ee22 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 @@ -100,7 +100,7 @@ or * access method is generally applicable, but further authorisation processes startAuthorisation = LinkHrefJson(s"/v1.3/payments/sepa-credit-transfers/cancellation-authorisations/1234-wertiq-983/status") ) ), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: Nil ) @@ -176,7 +176,7 @@ This method returns the SCA status of a payment initiation's authorisation sub-r json.parse("""{ "scaStatus" : "psuAuthenticated" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -223,7 +223,7 @@ Returns the content of a payment object""", }, "creditorName":"70charname" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM ::Nil ) @@ -282,7 +282,7 @@ This function returns an array of hyperlinks to all generated authorisation sub- } } ]"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -320,7 +320,7 @@ Retrieve a list of all created cancellation authorisation sub-resources. json.parse("""{ "cancellationIds" : ["faa3657e-13f0-4feb-a6c3-34bf21a9ae8e]" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -357,7 +357,7 @@ This method returns the SCA status of a payment initiation's authorisation sub-r json.parse("""{ "scaStatus" : "psuAuthenticated" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -396,7 +396,7 @@ Check the transaction status of a payment initiation.""", json.parse(s"""{ "transactionStatus": "${TransactionStatus.ACCP.code}" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -607,7 +607,7 @@ Check the transaction status of a payment initiation.""", "scaStatus": {"href": "/v1.3/payments/1234-wertiq-983/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -656,7 +656,7 @@ Check the transaction status of a payment initiation.""", "scaStatus": {"href": "/v1.3/periodic-payments/1234-wertiq-983/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -718,7 +718,7 @@ Check the transaction status of a payment initiation.""", "scaStatus": {"href": "/v1.3/bulk-payments/1234-wertiq-983/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -789,7 +789,7 @@ This applies in the following scenarios: } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -833,7 +833,7 @@ This applies in the following scenarios: } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -877,7 +877,7 @@ This applies in the following scenarios: } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -971,7 +971,7 @@ This applies in the following scenarios: } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1039,7 +1039,7 @@ This applies in the following scenarios: } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1083,7 +1083,7 @@ This applies in the following scenarios: } } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1168,7 +1168,7 @@ There are the following request types on this access path: "scaStatus":"/v1.3/payments/sepa-credit-transfers/PAYMENT_ID/4f4a8b7f-9968-4183-92ab-ca512b396bfc" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1247,7 +1247,7 @@ There are the following request types on this access path: "authoriseTransaction": {"href": "/psd2/v1.3/payments/1234-wertiq-983/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1289,7 +1289,7 @@ There are the following request types on this access path: "authoriseTransaction": {"href": "/psd2/v1.3/payments/1234-wertiq-983/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1331,7 +1331,7 @@ There are the following request types on this access path: "status": {"href":"/v1.3/payments/sepa-credit-transfers/qwer3456tzui7890/status"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1415,7 +1415,7 @@ There are the following request types on this access path: "scaStatus": {"href":"/v1.3/payments/sepa-credit-transfers/88695566-6642-46d5-9985-0d824624f507"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1490,7 +1490,7 @@ There are the following request types on this access path: "scaStatus": {"href":"/v1.3/payments/sepa-credit-transfers/88695566-6642-46d5-9985-0d824624f507"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1534,7 +1534,7 @@ There are the following request types on this access path: "authoriseTransaction": {"href": "/psd2/v1.3/payments/1234-wertiq-983/authorisations/123auth456"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) @@ -1578,7 +1578,7 @@ There are the following request types on this access path: "status": {"href":"/v1.3/payments/sepa-credit-transfers/qwer3456tzui7890/status"} } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil ) diff --git a/obp-api/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala b/obp-api/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala index 664bcee8ef..2b02ec4ce5 100644 --- a/obp-api/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala +++ b/obp-api/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala @@ -97,7 +97,7 @@ The resource identifications of these transactions are contained in the payload "transactionStatus" : "ACCP", "psuMessage" : { } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -146,7 +146,7 @@ Nevertheless, single transactions might be cancelled on an individual basis on t """, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -182,7 +182,7 @@ Returns the content of an signing basket object.""", "payments" : "", "consents" : "" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -219,7 +219,7 @@ This function returns an array of hyperlinks to all generated authorisation sub- json.parse("""{ "authorisationIds" : "" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -250,7 +250,7 @@ This method returns the SCA status of a signing basket's authorisation sub-resou json.parse("""{ "scaStatus" : "psuAuthenticated" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -286,7 +286,7 @@ Returns the status of a signing basket object. json.parse("""{ "transactionStatus" : "RCVD" }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -372,7 +372,7 @@ This applies in the following scenarios: "chosenScaMethod" : "", "psuMessage" : { } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) @@ -461,7 +461,7 @@ There are the following request types on this access path: "scaStatus":"/v1.3/payments/sepa-credit-transfers/PAYMENT_ID/4f4a8b7f-9968-4183-92ab-ca512b396bfc" } }"""), - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagSigningBaskets :: Nil ) diff --git a/obp-api/src/main/scala/code/api/dynamic/endpoint/helper/DynamicEndpointHelper.scala b/obp-api/src/main/scala/code/api/dynamic/endpoint/helper/DynamicEndpointHelper.scala index bf423d647b..0866e8e09e 100644 --- a/obp-api/src/main/scala/code/api/dynamic/endpoint/helper/DynamicEndpointHelper.scala +++ b/obp-api/src/main/scala/code/api/dynamic/endpoint/helper/DynamicEndpointHelper.scala @@ -6,7 +6,7 @@ import code.DynamicData.{DynamicDataProvider, DynamicDataT} import code.DynamicEndpoint.{DynamicEndpointProvider, DynamicEndpointT} import code.api.util.APIUtil.{BigDecimalBody, BigIntBody, BooleanBody, DoubleBody, EmptyBody, FloatBody, IntBody, JArrayBody, LongBody, PrimaryDataBody, ResourceDoc, StringBody} import code.api.util.ApiTag._ -import code.api.util.ErrorMessages.{DynamicDataNotFound, InvalidUrlParameters, UnknownError, UserHasMissingRoles, UserNotLoggedIn} +import code.api.util.ErrorMessages.{DynamicDataNotFound, InvalidUrlParameters, UnknownError, UserHasMissingRoles, AuthenticatedUserIsRequired} import code.api.util.{APIUtil, ApiRole, ApiTag, CommonUtil, CustomJsonFormats, NewStyle} import com.openbankproject.commons.util.{ApiShortVersions, ApiStandards, ApiVersion} import com.openbankproject.commons.util.Functions.Memo @@ -324,7 +324,7 @@ object DynamicEndpointHelper extends RestHelper { val exampleRequestBody: Product = getRequestExample(openAPI, op.getRequestBody) val (successCode, successResponseBody: Product) = getResponseExample(openAPI, op.getResponses) val errorResponseBodies: List[String] = List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ) diff --git a/obp-api/src/main/scala/code/api/dynamic/entity/helper/DynamicEntityHelper.scala b/obp-api/src/main/scala/code/api/dynamic/entity/helper/DynamicEntityHelper.scala index b2ae7586a6..34f5d31685 100644 --- a/obp-api/src/main/scala/code/api/dynamic/entity/helper/DynamicEntityHelper.scala +++ b/obp-api/src/main/scala/code/api/dynamic/entity/helper/DynamicEntityHelper.scala @@ -3,7 +3,7 @@ package code.api.dynamic.entity.helper import code.api.util.APIUtil.{EmptyBody, ResourceDoc, userAuthenticationMessage} import code.api.util.ApiRole.getOrCreateDynamicApiRole import code.api.util.ApiTag._ -import code.api.util.ErrorMessages.{InvalidJsonFormat, UnknownError, UserHasMissingRoles, UserNotLoggedIn} +import code.api.util.ErrorMessages.{InvalidJsonFormat, UnknownError, UserHasMissingRoles, AuthenticatedUserIsRequired} import code.api.util._ import com.openbankproject.commons.model.enums.{DynamicEntityFieldType, DynamicEntityOperation} import com.openbankproject.commons.util.ApiVersion @@ -183,7 +183,7 @@ object DynamicEntityHelper { EmptyBody, dynamicEntityInfo.getExampleList, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -211,7 +211,7 @@ object DynamicEntityHelper { EmptyBody, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -240,7 +240,7 @@ object DynamicEntityHelper { dynamicEntityInfo.getSingleExampleWithoutId, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -270,7 +270,7 @@ object DynamicEntityHelper { dynamicEntityInfo.getSingleExampleWithoutId, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -297,7 +297,7 @@ object DynamicEntityHelper { dynamicEntityInfo.getSingleExampleWithoutId, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -331,7 +331,7 @@ object DynamicEntityHelper { EmptyBody, dynamicEntityInfo.getExampleList, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UnknownError ), List(apiTag, apiTagDynamicEntity, apiTagDynamic), @@ -357,7 +357,7 @@ object DynamicEntityHelper { EmptyBody, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UnknownError ), List(apiTag, apiTagDynamicEntity, apiTagDynamic), @@ -384,7 +384,7 @@ object DynamicEntityHelper { dynamicEntityInfo.getSingleExampleWithoutId, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -412,7 +412,7 @@ object DynamicEntityHelper { dynamicEntityInfo.getSingleExampleWithoutId, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -438,7 +438,7 @@ object DynamicEntityHelper { dynamicEntityInfo.getSingleExampleWithoutId, dynamicEntityInfo.getSingleExample, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UnknownError ), List(apiTag, apiTagDynamicEntity, apiTagDynamic), 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 c1a47283bd..ed4f0c9642 100644 --- a/obp-api/src/main/scala/code/api/util/APIUtil.scala +++ b/obp-api/src/main/scala/code/api/util/APIUtil.scala @@ -729,7 +729,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ message.contains(extractErrorMessageCode(ConsumerHasMissingRoles)) } def check401(message: String): Boolean = { - message.contains(extractErrorMessageCode(UserNotLoggedIn)) + message.contains(extractErrorMessageCode(AuthenticatedUserIsRequired)) } def check408(message: String): Boolean = { message.contains(extractErrorMessageCode(requestTimeout)) @@ -1659,21 +1659,21 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ if (rolesIsEmpty) { errorResponseBodies ?-= UserHasMissingRoles } else { - errorResponseBodies ?+= UserNotLoggedIn + errorResponseBodies ?+= AuthenticatedUserIsRequired errorResponseBodies ?+= UserHasMissingRoles } - // if authentication is required, add UserNotLoggedIn to errorResponseBodies + // if authentication is required, add AuthenticatedUserIsRequired to errorResponseBodies if (description.contains(authenticationIsRequired)) { - errorResponseBodies ?+= UserNotLoggedIn + errorResponseBodies ?+= AuthenticatedUserIsRequired } else if (description.contains(authenticationIsOptional) && rolesIsEmpty) { - errorResponseBodies ?-= UserNotLoggedIn - } else if (errorResponseBodies.contains(UserNotLoggedIn)) { + errorResponseBodies ?-= AuthenticatedUserIsRequired + } else if (errorResponseBodies.contains(AuthenticatedUserIsRequired)) { description += s""" | |$authenticationIsRequired |""" - } else if (!errorResponseBodies.contains(UserNotLoggedIn)) { + } else if (!errorResponseBodies.contains(AuthenticatedUserIsRequired)) { description += s""" | @@ -1763,7 +1763,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ private val requestUrlPartPath: Array[String] = StringUtils.split(requestUrl, '/') - private val isNeedCheckAuth = errorResponseBodies.contains($UserNotLoggedIn) + private val isNeedCheckAuth = errorResponseBodies.contains($AuthenticatedUserIsRequired) private val isNeedCheckRoles = _autoValidateRoles && rolesForCheck.nonEmpty private val isNeedCheckBank = errorResponseBodies.contains($BankNotFound) && requestUrlPartPath.contains("BANK_ID") private val isNeedCheckAccount = errorResponseBodies.contains($BankAccountNotFound) && @@ -1780,7 +1780,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ }.toMap /** - * According errorResponseBodies whether contains UserNotLoggedIn and UserHasMissingRoles do validation. + * According errorResponseBodies whether contains AuthenticatedUserIsRequired and UserHasMissingRoles do validation. * So can avoid duplicate code in endpoint body for expression do check. * Note: maybe this will be misused, So currently just comment out. */ @@ -3319,7 +3319,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ * This function is used to factor out common code at endpoints regarding Authorized access * @param emptyUserErrorMsg is a message which will be provided as a response in case that Box[User] = Empty */ - def authenticatedAccess(cc: CallContext, emptyUserErrorMsg: String = UserNotLoggedIn): OBPReturnType[Box[User]] = { + def authenticatedAccess(cc: CallContext, emptyUserErrorMsg: String = AuthenticatedUserIsRequired): OBPReturnType[Box[User]] = { anonymousAccess(cc) map{ x => ( fullBoxOrException(x._1 ~> APIFailureNewStyle(emptyUserErrorMsg, 401, Some(cc.toLight))), diff --git a/obp-api/src/main/scala/code/api/util/ApiSession.scala b/obp-api/src/main/scala/code/api/util/ApiSession.scala index a9ea2b5d5e..30946d18c3 100644 --- a/obp-api/src/main/scala/code/api/util/ApiSession.scala +++ b/obp-api/src/main/scala/code/api/util/ApiSession.scala @@ -6,11 +6,11 @@ import code.api.JSONFactoryGateway.PayloadOfJwtJSON import code.api.oauth1a.OauthParams._ import code.api.util.APIUtil._ import code.api.util.AuthenticationType.{Anonymous, DirectLogin, GatewayLogin, DAuth, OAuth2_OIDC, OAuth2_OIDC_FAPI} -import code.api.util.ErrorMessages.{BankAccountNotFound, UserNotLoggedIn} +import code.api.util.ErrorMessages.{BankAccountNotFound, AuthenticatedUserIsRequired} import code.api.util.RateLimitingJson.CallLimit import code.context.UserAuthContextProvider import code.customer.CustomerX -import code.model.{Consumer, _} +import code.model._ import code.util.Helper.MdcLoggable import code.util.SecureLogging import code.views.Views @@ -147,9 +147,9 @@ case class CallContext( } // for endpoint body convenient get userId - def userId: String = user.map(_.userId).openOrThrowException(UserNotLoggedIn) - def userPrimaryKey: UserPrimaryKey = user.map(_.userPrimaryKey).openOrThrowException(UserNotLoggedIn) - def loggedInUser: User = user.openOrThrowException(UserNotLoggedIn) + def userId: String = user.map(_.userId).openOrThrowException(AuthenticatedUserIsRequired) + def userPrimaryKey: UserPrimaryKey = user.map(_.userPrimaryKey).openOrThrowException(AuthenticatedUserIsRequired) + def loggedInUser: User = user.openOrThrowException(AuthenticatedUserIsRequired) // for endpoint body convenient get cc.callContext def callContext: Option[CallContext] = Option(this) diff --git a/obp-api/src/main/scala/code/api/util/ErrorMessages.scala b/obp-api/src/main/scala/code/api/util/ErrorMessages.scala index 0a5110ebea..87f28e693c 100644 --- a/obp-api/src/main/scala/code/api/util/ErrorMessages.scala +++ b/obp-api/src/main/scala/code/api/util/ErrorMessages.scala @@ -140,7 +140,7 @@ object ErrorMessages { // Authentication / Authorisation / User messages (OBP-20XXX) - val UserNotLoggedIn = "OBP-20001: User not logged in. Authentication is required!" + val AuthenticatedUserIsRequired = "OBP-20001: User not logged in. Authentication is required!" val DirectLoginMissingParameters = "OBP-20002: These DirectLogin parameters are missing:" val DirectLoginInvalidToken = "OBP-20003: This DirectLogin token is invalid or expired:" val InvalidLoginCredentials = "OBP-20004: Invalid login credentials. Check username/password." @@ -834,7 +834,7 @@ object ErrorMessages { // NotImplemented -> 501, // 400 or 501 TooManyRequests -> 429, ResourceDoesNotExist -> 404, - UserNotLoggedIn -> 401, + AuthenticatedUserIsRequired -> 401, DirectLoginInvalidToken -> 401, InvalidLoginCredentials -> 401, UserNotFoundById -> 404, @@ -889,7 +889,7 @@ object ErrorMessages { /** * validate method: APIUtil.authorizedAccess */ - def $UserNotLoggedIn = UserNotLoggedIn + def $AuthenticatedUserIsRequired = AuthenticatedUserIsRequired /** * validate method: NewStyle.function.getBank diff --git a/obp-api/src/main/scala/code/api/util/ExampleValue.scala b/obp-api/src/main/scala/code/api/util/ExampleValue.scala index b2fd736fb0..a3f2e8aa00 100644 --- a/obp-api/src/main/scala/code/api/util/ExampleValue.scala +++ b/obp-api/src/main/scala/code/api/util/ExampleValue.scala @@ -4,7 +4,7 @@ package code.api.util import code.api.Constant import code.api.Constant._ import code.api.util.APIUtil.{DateWithMs, DateWithMsExampleString, formatDate, oneYearAgoDate, parseDate} -import code.api.util.ErrorMessages.{InvalidJsonFormat, UnknownError, UserHasMissingRoles, UserNotLoggedIn} +import code.api.util.ErrorMessages.{InvalidJsonFormat, UnknownError, UserHasMissingRoles, AuthenticatedUserIsRequired} import code.api.util.Glossary.{glossaryItems, makeGlossaryItem} import code.apicollection.ApiCollection import code.dynamicEntity._ @@ -570,7 +570,7 @@ object ExampleValue { """{"my_user_id": "some_id_value", "name": "Jhon", "age": 12, "hobby": ["coding"],"_optional_fields_": ["hobby"]}""".stripMargin, "the json string of the success response body.") glossaryItems += makeGlossaryItem("DynamicResourceDoc.successResponseBody", successResponseBodyExample) - lazy val errorResponseBodiesExample = ConnectorField(s"$UnknownError,$UserNotLoggedIn,$UserHasMissingRoles,$InvalidJsonFormat", "The possible error messages of the endpoint. ") + lazy val errorResponseBodiesExample = ConnectorField(s"$UnknownError,$AuthenticatedUserIsRequired,$UserHasMissingRoles,$InvalidJsonFormat", "The possible error messages of the endpoint. ") glossaryItems += makeGlossaryItem("DynamicResourceDoc.errorResponseBodies", errorResponseBodiesExample) diff --git a/obp-api/src/main/scala/code/api/util/http4s/ResourceDocMiddleware.scala b/obp-api/src/main/scala/code/api/util/http4s/ResourceDocMiddleware.scala new file mode 100644 index 0000000000..e69de29bb2 diff --git a/obp-api/src/main/scala/code/api/v1_2_1/APIMethods121.scala b/obp-api/src/main/scala/code/api/v1_2_1/APIMethods121.scala index 7a93c9e15c..a8cbead5b0 100644 --- a/obp-api/src/main/scala/code/api/v1_2_1/APIMethods121.scala +++ b/obp-api/src/main/scala/code/api/v1_2_1/APIMethods121.scala @@ -191,7 +191,7 @@ trait APIMethods121 { |* Website""", EmptyBody, bankJSON, - List(UserNotLoggedIn, UnknownError, BankNotFound), + List(AuthenticatedUserIsRequired, UnknownError, BankNotFound), apiTagBank :: apiTagPsd2 :: apiTagOldStyle :: Nil) @@ -223,7 +223,7 @@ trait APIMethods121 { |""".stripMargin, EmptyBody, accountJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagAccount :: apiTagPsd2 :: apiTagOldStyle :: Nil) //TODO double check with `lazy val privateAccountsAllBanks :`, they are the same now. @@ -232,7 +232,7 @@ trait APIMethods121 { case "accounts" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired (privateViewsUserCanAccess, privateAccountAccess) <- Full(Views.views.vend.privateViewsUserCanAccess(u)) availablePrivateAccounts <- Full(BankAccountX.privateAccounts(privateAccountAccess)) } yield { @@ -256,7 +256,7 @@ trait APIMethods121 { |""".stripMargin, EmptyBody, accountJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), apiTagAccount :: apiTagPsd2 :: apiTagOldStyle :: Nil) lazy val privateAccountsAllBanks : OBPEndpoint = { @@ -264,7 +264,7 @@ trait APIMethods121 { case "accounts" :: "private" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired (privateViewsUserCanAccess, privateAccountAccess) <- Full(Views.views.vend.privateViewsUserCanAccess(u)) privateAccounts <- Full(BankAccountX.privateAccounts(privateAccountAccess)) } yield { @@ -320,7 +320,7 @@ trait APIMethods121 { """, EmptyBody, accountJSON, - List(UserNotLoggedIn, UnknownError, BankNotFound), + List(AuthenticatedUserIsRequired, UnknownError, BankNotFound), apiTagAccount :: apiTagOldStyle :: Nil) lazy val getPrivateAccountsAtOneBank : OBPEndpoint = { @@ -328,7 +328,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: Nil JsonGet req => { cc => for{ - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired (bank, callContext) <- BankX(bankId, Some(cc)) ?~! BankNotFound } yield { val (privateViewsUserCanAccessAtOneBank, privateAccountAccess) = Views.views.vend.privateViewsUserCanAccessAtBank(u, bankId) @@ -353,7 +353,7 @@ trait APIMethods121 { |""".stripMargin, EmptyBody, accountJSON, - List(UserNotLoggedIn, UnknownError, BankNotFound), + List(AuthenticatedUserIsRequired, UnknownError, BankNotFound), List(apiTagAccount, apiTagPsd2, apiTagOldStyle)) lazy val privateAccountsAtOneBank : OBPEndpoint = { @@ -361,7 +361,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: "private" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired (bank, callContext) <- BankX(bankId, Some(cc)) ?~! BankNotFound } yield { val (privateViewsUserCanAccessAtOneBank, privateAccountAccess) = Views.views.vend.privateViewsUserCanAccessAtBank(u, bankId) @@ -385,7 +385,7 @@ trait APIMethods121 { |""".stripMargin, EmptyBody, accountJSON, - List(UserNotLoggedIn, UnknownError, BankNotFound), + List(AuthenticatedUserIsRequired, UnknownError, BankNotFound), apiTagAccountPublic :: apiTagAccount :: apiTagPublicData :: apiTagOldStyle :: Nil) lazy val publicAccountsAtOneBank : OBPEndpoint = { @@ -428,7 +428,7 @@ trait APIMethods121 { |""".stripMargin, EmptyBody, moderatedAccountJSON, - List(UserNotLoggedIn, UnknownError, BankAccountNotFound), + List(AuthenticatedUserIsRequired, UnknownError, BankAccountNotFound), apiTagAccount :: apiTagOldStyle :: Nil) lazy val accountById : OBPEndpoint = { @@ -436,7 +436,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: ViewId(viewId) :: "account" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired (account, callContext) <- BankAccountX(bankId, accountId, Some(cc)) ?~! BankAccountNotFound availableviews <- Full(Views.views.vend.privateViewsUserCanAccessForAccount(u, BankIdAccountId(account.bankId, account.accountId))) view <- APIUtil.checkViewAccessAndReturnView(viewId, BankIdAccountId(account.bankId, account.accountId), Some(u), callContext) @@ -464,7 +464,7 @@ trait APIMethods121 { """.stripMargin, updateAccountJSON, successMessage, - List(InvalidJsonFormat, UserNotLoggedIn, UnknownError, BankAccountNotFound, "user does not have access to owner view on account"), + List(InvalidJsonFormat, AuthenticatedUserIsRequired, UnknownError, BankAccountNotFound, "user does not have access to owner view on account"), List(apiTagAccount) ) @@ -529,7 +529,7 @@ trait APIMethods121 { |${userAuthenticationMessage(true)} and the user needs to have access to the owner view.""", EmptyBody, viewsJSONV121, - List(UserNotLoggedIn, BankAccountNotFound, UnknownError, "user does not have owner access"), + List(AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "user does not have owner access"), List(apiTagView, apiTagAccount, apiTagOldStyle)) lazy val getViewsForBankAccount : OBPEndpoint = { @@ -537,7 +537,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "views" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired bankAccount <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound permission <- Views.views.vend.permission(BankIdAccountId(bankAccount.bankId, bankAccount.accountId), u) anyViewContainsCanSeeAvailableViewsForBankAccountPermission = permission.views.map(_.allowed_actions.exists(_ == CAN_SEE_AVAILABLE_VIEWS_FOR_BANK_ACCOUNT)).find(_.==(true)).getOrElse(false) @@ -576,7 +576,7 @@ trait APIMethods121 { createViewJsonV121, viewJSONV121, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, BankAccountNotFound, UnknownError, @@ -590,7 +590,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "views" :: Nil JsonPost json -> _ => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired createViewJsonV121 <- tryo{json.extract[CreateViewJsonV121]} ?~ InvalidJsonFormat //customer views are started ith `_`,eg _life, _work, and System views startWith letter, eg: owner _<- booleanToBox(isValidCustomViewName(createViewJsonV121.name), InvalidCustomViewFormat+s"Current view_name (${createViewJsonV121.name})") @@ -635,7 +635,7 @@ trait APIMethods121 { viewJSONV121, List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, ViewNotFound, UnknownError, @@ -653,7 +653,7 @@ trait APIMethods121 { for { updateJsonV121 <- tryo{ json.extract[UpdateViewJsonV121] } ?~ InvalidJsonFormat account <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired //customer views are started ith `_`,eg _life, _work, and System views startWith letter, eg: owner _ <- booleanToBox(viewId.value.startsWith("_"), InvalidCustomViewFormat +s"Current view_id (${viewId.value})") view <- Views.views.vend.customView(viewId, BankIdAccountId(bankId, accountId)) ?~! ViewNotFound @@ -691,7 +691,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "user does not have owner access" @@ -740,7 +740,7 @@ trait APIMethods121 { |${userAuthenticationMessage(true)} and the user needs to have access to the owner view.""", EmptyBody, permissionsJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagView, apiTagAccount, apiTagEntitlement, apiTagOldStyle) ) @@ -749,7 +749,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "permissions" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired account <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound anyViewContainsCanSeeViewsWithPermissionsForAllUsersPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u) .map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS))).getOrElse(Nil).find(_.==(true)).getOrElse(false) @@ -779,7 +779,7 @@ trait APIMethods121 { EmptyBody, viewsJSONV121, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "user does not have access to owner view on account" @@ -793,7 +793,7 @@ trait APIMethods121 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "permissions" :: provider :: providerId :: Nil JsonGet req => { cc => for { - loggedInUser <- cc.user ?~ UserNotLoggedIn + loggedInUser <- cc.user ?~ AuthenticatedUserIsRequired account <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound loggedInUserPermissionBox = Views.views.vend.permission(BankIdAccountId(bankId, accountId), loggedInUser) anyViewContainsCanSeeViewsWithPermissionsForOneUserPermission = loggedInUserPermissionBox.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER))) @@ -828,7 +828,7 @@ trait APIMethods121 { viewIdsJson, viewsJSONV121, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "wrong format JSON", @@ -877,7 +877,7 @@ trait APIMethods121 { EmptyBody, // No Json body required viewJSONV121, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, UserLacksPermissionCanGrantAccessToViewForTargetAccount, @@ -938,7 +938,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "could not save the privilege", "user does not have access to owner view on account", @@ -976,7 +976,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "user does not have access to owner view on account" @@ -1074,7 +1074,7 @@ trait APIMethods121 { |Authentication via OAuth is required if the view is not public.""", EmptyBody, otherAccountMetadataJSON, - List(UserNotLoggedIn, UnknownError, "the view does not allow metadata access"), + List(AuthenticatedUserIsRequired, UnknownError, "the view does not allow metadata access"), List(apiTagCounterpartyMetaData, apiTagCounterparty)) lazy val getOtherAccountMetadata : OBPEndpoint = { @@ -1212,7 +1212,7 @@ trait APIMethods121 { List( BankAccountNotFound, InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, "the view does not allow metadata access", "the view does not allow updating the public alias", "Alias cannot be updated", @@ -1311,7 +1311,7 @@ trait APIMethods121 { EmptyBody, aliasJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "the view does not allow private alias access", @@ -1355,7 +1355,7 @@ trait APIMethods121 { aliasJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -1407,7 +1407,7 @@ trait APIMethods121 { aliasJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -1459,7 +1459,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "the view does not allow deleting the private alias", @@ -1506,7 +1506,7 @@ trait APIMethods121 { moreInfoJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, NoViewPermission, @@ -1556,7 +1556,7 @@ trait APIMethods121 { moreInfoJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -1605,7 +1605,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "the view does not allow deleting more info", @@ -1652,7 +1652,7 @@ trait APIMethods121 { urlJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -1702,7 +1702,7 @@ trait APIMethods121 { urlJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, NoViewPermission, @@ -1751,7 +1751,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "the view does not allow deleting a url", @@ -1798,7 +1798,7 @@ trait APIMethods121 { imageUrlJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -1984,7 +1984,7 @@ trait APIMethods121 { openCorporateUrlJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -2033,7 +2033,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "the view does not allow deleting an open corporate url", @@ -2080,7 +2080,7 @@ trait APIMethods121 { corporateLocationJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "the view does not allow adding a corporate location", @@ -2134,7 +2134,7 @@ trait APIMethods121 { corporateLocationJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -2187,7 +2187,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, "the view does not allow metadata access", "Corporate Location cannot be deleted", @@ -2236,7 +2236,7 @@ trait APIMethods121 { physicalLocationJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -2291,7 +2291,7 @@ trait APIMethods121 { physicalLocationJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, "the view does not allow metadata access", @@ -2344,7 +2344,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, NoViewPermission, "Physical Location cannot be deleted", @@ -2611,7 +2611,7 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, NoViewPermission, UnknownError), @@ -2648,7 +2648,7 @@ trait APIMethods121 { EmptyBody, transactionCommentsJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, NoViewPermission, ViewNotFound, @@ -2687,7 +2687,7 @@ trait APIMethods121 { postTransactionCommentJSON, transactionCommentJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, BankAccountNotFound, NoViewPermission, @@ -2734,7 +2734,7 @@ trait APIMethods121 { BankAccountNotFound, NoViewPermission, ViewNotFound, - UserNotLoggedIn, + AuthenticatedUserIsRequired, UnknownError), List(apiTagTransactionMetaData, apiTagTransaction)) @@ -2808,7 +2808,7 @@ trait APIMethods121 { postTransactionTagJSON, transactionTagJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, NoViewPermission, @@ -2889,7 +2889,7 @@ trait APIMethods121 { EmptyBody, transactionImagesJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, NoViewPermission, ViewNotFound, @@ -2974,7 +2974,7 @@ trait APIMethods121 { List( BankAccountNotFound, NoViewPermission, - UserNotLoggedIn, + AuthenticatedUserIsRequired, "You must be able to see images in order to delete them", "Image not found for this transaction", "Deleting images not permitted for this view", @@ -3053,7 +3053,7 @@ trait APIMethods121 { postTransactionWhereJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, ViewNotFound, @@ -3099,7 +3099,7 @@ trait APIMethods121 { postTransactionWhereJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, InvalidJsonFormat, ViewNotFound, @@ -3145,10 +3145,10 @@ trait APIMethods121 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, NoViewPermission, - UserNotLoggedIn, + AuthenticatedUserIsRequired, ViewNotFound, "there is no tag to delete", "Delete not completed", diff --git a/obp-api/src/main/scala/code/api/v1_3_0/APIMethods130.scala b/obp-api/src/main/scala/code/api/v1_3_0/APIMethods130.scala index 5cd2d75cc2..f3abe43b1b 100644 --- a/obp-api/src/main/scala/code/api/v1_3_0/APIMethods130.scala +++ b/obp-api/src/main/scala/code/api/v1_3_0/APIMethods130.scala @@ -67,7 +67,7 @@ trait APIMethods130 { "Returns data about all the physical cards a user has been issued. These could be debit cards, credit cards, etc.", EmptyBody, physicalCardsJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagCard)) lazy val getCards : OBPEndpoint = { @@ -95,7 +95,7 @@ trait APIMethods130 { "", EmptyBody, physicalCardsJSON, - List(UserNotLoggedIn,BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired,BankNotFound, UnknownError), List(apiTagCard), Some(List(canGetCardsForBank))) diff --git a/obp-api/src/main/scala/code/api/v1_4_0/APIMethods140.scala b/obp-api/src/main/scala/code/api/v1_4_0/APIMethods140.scala index b740080283..aa36e92439 100644 --- a/obp-api/src/main/scala/code/api/v1_4_0/APIMethods140.scala +++ b/obp-api/src/main/scala/code/api/v1_4_0/APIMethods140.scala @@ -104,14 +104,14 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ |Authentication via OAuth is required.""", EmptyBody, customerJsonV140, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagCustomer, apiTagOldStyle)) lazy val getCustomer : OBPEndpoint = { case "banks" :: BankId(bankId) :: "customer" :: Nil JsonGet _ => { cc => { for { - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {ErrorMessages.BankNotFound} ucls <- tryo{UserCustomerLink.userCustomerLink.vend.getUserCustomerLinksByUserId(u.userId)} ?~! ErrorMessages.UserCustomerLinksNotFoundForUser ucl <- tryo{ucls.find(x=>CustomerX.customerProvider.vend.getBankIdByCustomerId(x.customerId) == bankId.value)} @@ -139,7 +139,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ |Authentication via OAuth is required.""", EmptyBody, customerMessagesJson, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagMessage, apiTagCustomer)) lazy val getCustomersMessages : OBPEndpoint = { @@ -171,7 +171,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ // We use Extraction.decompose to convert to json addCustomerMessageJson, successMessage, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagMessage, apiTagCustomer, apiTagPerson) ) @@ -225,7 +225,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ EmptyBody, branchesJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, "No branches available. License may not be set.", UnknownError), @@ -239,7 +239,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ _ <- if(getBranchesIsPublic) Box(Some(1)) else - cc.user ?~! UserNotLoggedIn + cc.user ?~! AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {ErrorMessages.BankNotFound} // Get branches from the active provider httpParams <- createHttpParamsByUrl(cc.url) @@ -277,7 +277,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ EmptyBody, atmsJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, "No ATMs available. License may not be set.", UnknownError), @@ -293,7 +293,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ _ <- if(getAtmsIsPublic) Box(Some(1)) else - cc.user ?~! UserNotLoggedIn + cc.user ?~! AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {ErrorMessages.BankNotFound} httpParams <- createHttpParamsByUrl(cc.url) @@ -335,7 +335,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ EmptyBody, productsJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, "No products available.", "License may not be set.", @@ -351,7 +351,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ _ <- if(getProductsIsPublic) Box(Some(1)) else - cc.user ?~! UserNotLoggedIn + cc.user ?~! AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {ErrorMessages.BankNotFound} products <- Box(Products.productsProvider.vend.getProducts(bankId)) ~> APIFailure("No products available. License may not be set.", 204) } yield { @@ -376,7 +376,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ EmptyBody, crmEventsJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, "No CRM Events available.", UnknownError), @@ -431,7 +431,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ EmptyBody, transactionRequestTypesJsonV140, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, AccountNotFound, "Please specify a valid value for CURRENCY of your Bank Account. " @@ -491,7 +491,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{ code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON.createCustomerJson, customerJsonV140, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, "entitlements required", diff --git a/obp-api/src/main/scala/code/api/v2_0_0/APIMethods200.scala b/obp-api/src/main/scala/code/api/v2_0_0/APIMethods200.scala index 894261e4c2..3115556587 100644 --- a/obp-api/src/main/scala/code/api/v2_0_0/APIMethods200.scala +++ b/obp-api/src/main/scala/code/api/v2_0_0/APIMethods200.scala @@ -7,7 +7,7 @@ import code.api.Constant._ import code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON._ import code.api.util.APIUtil._ import code.api.util.ApiTag._ -import code.api.util.ErrorMessages.UserNotLoggedIn +import code.api.util.ErrorMessages.AuthenticatedUserIsRequired import code.api.util.FutureUtil.EndpointContext import code.api.util.NewStyle.HttpCode import code.api.util._ @@ -173,7 +173,7 @@ trait APIMethods200 { |""".stripMargin, EmptyBody, basicAccountsJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagAccount, apiTagPrivateData, apiTagPublicData, apiTagOldStyle)) @@ -182,7 +182,7 @@ trait APIMethods200 { case "accounts" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired (privateViewsUserCanAccess, privateAccountAccess) <- Full(Views.views.vend.privateViewsUserCanAccess(u)) privateAccounts <- Full(BankAccountX.privateAccounts(privateAccountAccess)) } yield { @@ -221,7 +221,7 @@ trait APIMethods200 { case "my" :: "accounts" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired (privateViewsUserCanAccess, privateAccountAccess) <- Full(Views.views.vend.privateViewsUserCanAccess(u)) privateAccounts <- Full(BankAccountX.privateAccounts(privateAccountAccess)) } yield { @@ -250,7 +250,7 @@ trait APIMethods200 { |""".stripMargin, EmptyBody, basicAccountsJSON, - List(UserNotLoggedIn, CannotGetAccounts, UnknownError), + List(AuthenticatedUserIsRequired, CannotGetAccounts, UnknownError), List(apiTagAccountPublic, apiTagAccount, apiTagPublicData) ) lazy val publicAccountsAllBanks : OBPEndpoint = { @@ -332,7 +332,7 @@ trait APIMethods200 { |""".stripMargin, EmptyBody, coreAccountsJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagAccount, apiTagPrivateData, apiTagPsd2)) apiRelations += ApiRelation(corePrivateAccountsAtOneBank, createAccount, "new") @@ -404,7 +404,7 @@ trait APIMethods200 { |""".stripMargin, EmptyBody, basicAccountsJSON, - List(UserNotLoggedIn, BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, UnknownError), List(apiTagAccount, apiTagPsd2) ) @@ -473,7 +473,7 @@ trait APIMethods200 { |${userAuthenticationMessage(false)}""".stripMargin, EmptyBody, kycDocumentsJSON, - List(UserNotLoggedIn, CustomerNotFoundByCustomerId, UnknownError), + List(AuthenticatedUserIsRequired, CustomerNotFoundByCustomerId, UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canGetAnyKycDocuments)) ) @@ -510,7 +510,7 @@ trait APIMethods200 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, kycMediasJSON, - List(UserNotLoggedIn, CustomerNotFoundByCustomerId, UnknownError), + List(AuthenticatedUserIsRequired, CustomerNotFoundByCustomerId, UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canGetAnyKycMedia))) @@ -543,7 +543,7 @@ trait APIMethods200 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, kycChecksJSON, - List(UserNotLoggedIn, CustomerNotFoundByCustomerId, UnknownError), + List(AuthenticatedUserIsRequired, CustomerNotFoundByCustomerId, UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canGetAnyKycChecks)) ) @@ -576,7 +576,7 @@ trait APIMethods200 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, kycStatusesJSON, - List(UserNotLoggedIn, CustomerNotFoundByCustomerId, UnknownError), + List(AuthenticatedUserIsRequired, CustomerNotFoundByCustomerId, UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canGetAnyKycStatuses)) ) @@ -610,7 +610,7 @@ trait APIMethods200 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, socialMediasJSON, - List(UserNotLoggedIn, UserHasMissingRoles, CustomerNotFoundByCustomerId, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, CustomerNotFoundByCustomerId, UnknownError), List(apiTagCustomer), Some(List(canGetSocialMediaHandles))) @@ -645,7 +645,7 @@ trait APIMethods200 { "Add a KYC document for the customer specified by CUSTOMER_ID. KYC Documents contain the document type (e.g. passport), place of issue, expiry etc. ", postKycDocumentJSON, kycDocumentJSON, - List(UserNotLoggedIn, InvalidJsonFormat, BankNotFound, CustomerNotFoundByCustomerId,"Server error: could not add KycDocument", UnknownError), + List(AuthenticatedUserIsRequired, InvalidJsonFormat, BankNotFound, CustomerNotFoundByCustomerId,"Server error: could not add KycDocument", UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canAddKycDocument)) ) @@ -697,7 +697,7 @@ trait APIMethods200 { "Add some KYC media for the customer specified by CUSTOMER_ID. KYC Media resources relate to KYC Documents and KYC Checks and contain media urls for scans of passports, utility bills etc", postKycMediaJSON, kycMediaJSON, - List(UserNotLoggedIn, InvalidJsonFormat, CustomerNotFoundByCustomerId, ServerAddDataError, UnknownError), + List(AuthenticatedUserIsRequired, InvalidJsonFormat, CustomerNotFoundByCustomerId, ServerAddDataError, UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canAddKycMedia)) ) @@ -747,7 +747,7 @@ trait APIMethods200 { "Add a KYC check for the customer specified by CUSTOMER_ID. KYC Checks store details of checks on a customer made by the KYC team, their comments and a satisfied status", postKycCheckJSON, kycCheckJSON, - List(UserNotLoggedIn, InvalidJsonFormat, BankNotFound, CustomerNotFoundByCustomerId, ServerAddDataError, UnknownError), + List(AuthenticatedUserIsRequired, InvalidJsonFormat, BankNotFound, CustomerNotFoundByCustomerId, ServerAddDataError, UnknownError), List(apiTagKyc, apiTagCustomer), Some(List(canAddKycCheck)) ) @@ -798,7 +798,7 @@ trait APIMethods200 { "Add a kyc_status for the customer specified by CUSTOMER_ID. KYC Status is a timeline of the KYC status of the customer", postKycStatusJSON, kycStatusJSON, - List(UserNotLoggedIn, InvalidJsonFormat, InvalidBankIdFormat,UnknownError, BankNotFound ,ServerAddDataError ,CustomerNotFoundByCustomerId), + List(AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidBankIdFormat,UnknownError, BankNotFound ,ServerAddDataError ,CustomerNotFoundByCustomerId), List(apiTagKyc, apiTagCustomer), Some(List(canAddKycStatus)) ) @@ -843,7 +843,7 @@ trait APIMethods200 { socialMediaJSON, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidBankIdFormat, UserHasMissingRoles, @@ -919,7 +919,7 @@ trait APIMethods200 { // TODO return specific error if bankId == "BANK_ID" or accountId == "ACCOUNT_ID" // Should be a generic guard we can use for all calls (also for userId etc.) for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired account <- BankAccountX(bankId, accountId) ?~ BankAccountNotFound // Assume owner view was requested view <- u.checkOwnerViewAccessAndReturnOwnerView(BankIdAccountId(account.bankId, account.accountId), Some(cc)) @@ -960,7 +960,7 @@ trait APIMethods200 { case "my" :: "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "transactions" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired params <- createQueriesByHttpParams(req.request.headers) (bank, callContext) <- BankX(bankId, Some(cc)) ?~ BankNotFound bankAccount <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound @@ -1010,7 +1010,7 @@ trait APIMethods200 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: ViewId(viewId) :: "account" :: Nil JsonGet req => { cc => for { - u <- cc.user ?~! UserNotLoggedIn + u <- cc.user ?~! AuthenticatedUserIsRequired (bank, callContext) <- BankX(bankId, Some(cc)) ?~ BankNotFound // Check bank exists. account <- BankAccountX(bank.bankId, accountId) ?~ {ErrorMessages.AccountNotFound} // Check Account exists. availableViews <- Full(Views.views.vend.privateViewsUserCanAccessForAccount(u, BankIdAccountId(account.bankId, account.accountId))) @@ -1039,7 +1039,7 @@ trait APIMethods200 { |""", EmptyBody, permissionsJSON, - List(UserNotLoggedIn, BankNotFound, AccountNotFound ,UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, AccountNotFound ,UnknownError), List(apiTagView, apiTagAccount, apiTagUser, apiTagEntitlement) ) @@ -1081,7 +1081,7 @@ trait APIMethods200 { |The user needs to have access to the owner view.""", EmptyBody, viewsJSONV121, - List(UserNotLoggedIn,BankNotFound, AccountNotFound,UnknownError), + List(AuthenticatedUserIsRequired,BankNotFound, AccountNotFound,UnknownError), List(apiTagView, apiTagAccount, apiTagUser, apiTagOldStyle)) lazy val getPermissionForUserForBankAccount : OBPEndpoint = { @@ -1089,7 +1089,7 @@ trait APIMethods200 { case "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "permissions" :: provider :: providerId :: Nil JsonGet req => { cc => for { - loggedInUser <- cc.user ?~! ErrorMessages.UserNotLoggedIn // Check we have a user (rather than error or empty) + loggedInUser <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired // Check we have a user (rather than error or empty) (bank, callContext) <- BankX(bankId, Some(cc)) ?~! BankNotFound // Check bank exists. account <- BankAccountX(bank.bankId, accountId) ?~! {ErrorMessages.AccountNotFound} // Check Account exists. loggedInUserPermissionBox = Views.views.vend.permission(BankIdAccountId(bankId, accountId), loggedInUser) @@ -1134,7 +1134,7 @@ trait APIMethods200 { CreateAccountJSON("A user_id","CURRENT", "Label", AmountOfMoneyJSON121("EUR", "0")), coreAccountJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidUserId, InvalidAccountIdFormat, @@ -1319,7 +1319,7 @@ trait APIMethods200 { |""", createUserJson, userJsonV200, - List(UserNotLoggedIn, InvalidJsonFormat, InvalidStrongPasswordFormat, DuplicateUsername, "Error occurred during user creation.", UnknownError), + List(AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidStrongPasswordFormat, DuplicateUsername, "Error occurred during user creation.", UnknownError), List(apiTagUser, apiTagOnboarding)) lazy val createUser: OBPEndpoint = { @@ -1395,7 +1395,7 @@ trait APIMethods200 { // CreateMeetingJson("tokbox", "onboarding"), // meetingJson, // List( -// UserNotLoggedIn, +// AuthenticatedUserIsRequired, // MeetingApiKeyNotConfigured, // MeetingApiSecretNotConfigured, // InvalidBankIdFormat, @@ -1415,7 +1415,7 @@ trait APIMethods200 { // // TODO use these keys to get session and tokens from tokbox // _ <- APIUtil.getPropsValue("meeting.tokbox_api_key") ~> APIFailure(MeetingApiKeyNotConfigured, 403) // _ <- APIUtil.getPropsValue("meeting.tokbox_api_secret") ~> APIFailure(MeetingApiSecretNotConfigured, 403) -// u <- cc.user ?~! UserNotLoggedIn +// u <- cc.user ?~! AuthenticatedUserIsRequired // _ <- tryo(assert(isValidID(bankId.value)))?~! InvalidBankIdFormat // (bank, callContext) <- BankX(bankId, Some(cc)) ?~! BankNotFound // postedData <- tryo {json.extract[CreateMeetingJson]} ?~! InvalidJsonFormat @@ -1455,7 +1455,7 @@ trait APIMethods200 { // EmptyBody, // meetingsJson, // List( -// UserNotLoggedIn, +// AuthenticatedUserIsRequired, // MeetingApiKeyNotConfigured, // MeetingApiSecretNotConfigured, // BankNotFound, @@ -1469,11 +1469,11 @@ trait APIMethods200 { // cc => // if (APIUtil.getPropsAsBoolValue("meeting.tokbox_enabled", false)) { // for { -// _ <- cc.user ?~! ErrorMessages.UserNotLoggedIn +// _ <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired // (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! BankNotFound // _ <- APIUtil.getPropsValue("meeting.tokbox_api_key") ~> APIFailure(ErrorMessages.MeetingApiKeyNotConfigured, 403) // _ <- APIUtil.getPropsValue("meeting.tokbox_api_secret") ~> APIFailure(ErrorMessages.MeetingApiSecretNotConfigured, 403) -// u <- cc.user ?~! ErrorMessages.UserNotLoggedIn +// u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired // (bank, callContext) <- BankX(bankId, Some(cc)) ?~! BankNotFound // // now = Calendar.getInstance().getTime() // meetings <- Meetings.meetingProvider.vend.getMeetings(bank.bankId, u) @@ -1510,7 +1510,7 @@ trait APIMethods200 { // EmptyBody, // meetingJson, // List( -// UserNotLoggedIn, +// AuthenticatedUserIsRequired, // BankNotFound, // MeetingApiKeyNotConfigured, // MeetingApiSecretNotConfigured, @@ -1526,7 +1526,7 @@ trait APIMethods200 { // cc => // if (APIUtil.getPropsAsBoolValue("meeting.tokbox_enabled", false)) { // for { -// u <- cc.user ?~! UserNotLoggedIn +// u <- cc.user ?~! AuthenticatedUserIsRequired // (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! BankNotFound // _ <- APIUtil.getPropsValue("meeting.tokbox_api_key") ~> APIFailure(ErrorMessages.MeetingApiKeyNotConfigured, 403) // _ <- APIUtil.getPropsValue("meeting.tokbox_api_secret") ~> APIFailure(ErrorMessages.MeetingApiSecretNotConfigured, 403) @@ -1563,7 +1563,7 @@ trait APIMethods200 { customerJsonV140, List( InvalidBankIdFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, CustomerNumberAlreadyExists, UserHasMissingRoles, @@ -1588,7 +1588,7 @@ trait APIMethods200 { case "banks" :: BankId(bankId) :: "customers" :: Nil JsonPost json -> _ => { cc => for { - u <- cc.user ?~! UserNotLoggedIn// TODO. CHECK user has role to create a customer / create a customer for another user id. + u <- cc.user ?~! AuthenticatedUserIsRequired // TODO. CHECK user has role to create a customer / create a customer for another user id. _ <- tryo(assert(isValidID(bankId.value)))?~! ErrorMessages.InvalidBankIdFormat (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! BankNotFound postedData <- tryo{json.extract[CreateCustomerJson]} ?~! ErrorMessages.InvalidJsonFormat @@ -1646,7 +1646,7 @@ trait APIMethods200 { """.stripMargin, EmptyBody, userJsonV200, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagUser, apiTagOldStyle)) @@ -1654,7 +1654,7 @@ trait APIMethods200 { case "users" :: "current" :: Nil JsonGet _ => { cc => for { - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired } yield { // Format the data as V2.0.0 json @@ -1680,7 +1680,7 @@ trait APIMethods200 { """.stripMargin, EmptyBody, usersJsonV200, - List(UserNotLoggedIn, UserHasMissingRoles, UserNotFoundByEmail, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByEmail, UnknownError), List(apiTagUser, apiTagOldStyle), Some(List(canGetAnyUser))) @@ -1689,7 +1689,7 @@ trait APIMethods200 { case "users" :: userEmail :: Nil JsonGet _ => { cc => for { - l <- cc.user ?~! ErrorMessages.UserNotLoggedIn + l <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired _ <- NewStyle.function.ownEntitlement("", l.userId, ApiRole.canGetAnyUser, cc.callContext) // Workaround to get userEmail address directly from URI without needing to URL-encode it users <- tryo{AuthUser.getResourceUsersByEmail(CurrentReq.value.uri.split("/").last)} ?~! {ErrorMessages.UserNotFoundByEmail} @@ -1725,7 +1725,7 @@ trait APIMethods200 { createUserCustomerLinkJson, userCustomerLinkJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidBankIdFormat, BankNotFound, InvalidJsonFormat, @@ -1797,7 +1797,7 @@ trait APIMethods200 { code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON.createEntitlementJSON, entitlementJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserNotFoundById, UserNotSuperAdmin, InvalidJsonFormat, @@ -1861,7 +1861,7 @@ trait APIMethods200 { """.stripMargin, EmptyBody, entitlementJSONs, - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagRole, apiTagEntitlement, apiTagUser, apiTagOldStyle), Some(List(canGetEntitlementsForAnyUserAtAnyBank))) @@ -1870,7 +1870,7 @@ trait APIMethods200 { case "users" :: userId :: "entitlements" :: Nil JsonGet _ => { cc => for { - u <- cc.user ?~ ErrorMessages.UserNotLoggedIn + u <- cc.user ?~ ErrorMessages.AuthenticatedUserIsRequired _ <- NewStyle.function.ownEntitlement("", u.userId, canGetEntitlementsForAnyUserAtAnyBank, cc.callContext) entitlements <- Entitlement.entitlement.vend.getEntitlementsByUserId(userId) } @@ -1906,7 +1906,7 @@ trait APIMethods200 { """.stripMargin, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UserHasMissingRoles, EntitlementNotFound, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, EntitlementNotFound, UnknownError), List(apiTagRole, apiTagUser, apiTagEntitlement), Some(List(canDeleteEntitlementAtAnyBank))) @@ -1945,7 +1945,7 @@ trait APIMethods200 { """.stripMargin, EmptyBody, entitlementJSONs, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagRole, apiTagEntitlement), Some(List(canGetEntitlementsForAnyUserAtAnyBank))) @@ -2040,7 +2040,7 @@ trait APIMethods200 { """, EmptyBody, emptyElasticSearch, //TODO what is output here? - List(UserNotLoggedIn, BankNotFound, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError), List(apiTagSearchWarehouse, apiTagOldStyle), Some(List(canSearchWarehouse))) @@ -2049,7 +2049,7 @@ trait APIMethods200 { case "search" :: "warehouse" :: queryString :: Nil JsonGet _ => { cc => for { - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired _ <- Entitlement.entitlement.vend.getEntitlement("", u.userId, ApiRole.CanSearchWarehouse.toString) ?~! {UserHasMissingRoles + CanSearchWarehouse} } yield { successJsonResponse(Extraction.decompose(esw.searchProxy(u.userId, queryString))) @@ -2126,7 +2126,7 @@ trait APIMethods200 { """, EmptyBody, emptyElasticSearch, - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagMetric, apiTagApi, apiTagOldStyle), Some(List(canSearchMetrics))) @@ -2135,7 +2135,7 @@ trait APIMethods200 { case "search" :: "metrics" :: queryString :: Nil JsonGet _ => { cc => for { - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired _ <- Entitlement.entitlement.vend.getEntitlement("", u.userId, ApiRole.CanSearchMetrics.toString) ?~! {UserHasMissingRoles + CanSearchMetrics} } yield { successJsonResponse(Extraction.decompose(esm.searchProxy(u.userId, queryString))) @@ -2156,14 +2156,14 @@ trait APIMethods200 { |Authentication via OAuth is required.""", EmptyBody, customersJsonV140, - List(UserNotLoggedIn, UserCustomerLinksNotFoundForUser, UnknownError), + List(AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError), List(apiTagPerson, apiTagCustomer, apiTagOldStyle)) lazy val getCustomers : OBPEndpoint = { case "users" :: "current" :: "customers" :: Nil JsonGet _ => { cc => { for { - u <- cc.user ?~! ErrorMessages.UserNotLoggedIn + u <- cc.user ?~! ErrorMessages.AuthenticatedUserIsRequired //(bank, callContext) <- Bank(bankId, Some(cc)) ?~! BankNotFound customers <- tryo{CustomerX.customerProvider.vend.getCustomersByUserId(u.userId)} ?~! UserCustomerLinksNotFoundForUser } yield { diff --git a/obp-api/src/main/scala/code/api/v2_1_0/APIMethods210.scala b/obp-api/src/main/scala/code/api/v2_1_0/APIMethods210.scala index 1c83ad6de7..798ff76130 100644 --- a/obp-api/src/main/scala/code/api/v2_1_0/APIMethods210.scala +++ b/obp-api/src/main/scala/code/api/v2_1_0/APIMethods210.scala @@ -123,7 +123,7 @@ trait APIMethods210 { SandboxData.importJson, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, DataImportDisabled, UserHasMissingRoles, @@ -171,7 +171,7 @@ trait APIMethods210 { |""", EmptyBody, transactionRequestTypesJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagTransactionRequest, apiTagBank)) @@ -275,8 +275,8 @@ trait APIMethods210 { transactionRequestBodyJsonV200, transactionRequestWithChargeJSON210, List( - UserNotLoggedIn, - UserNotLoggedIn, + AuthenticatedUserIsRequired, + AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -315,8 +315,8 @@ trait APIMethods210 { transactionRequestBodyCounterpartyJSON, transactionRequestWithChargeJSON210, List( - UserNotLoggedIn, - UserNotLoggedIn, + AuthenticatedUserIsRequired, + AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -359,8 +359,8 @@ trait APIMethods210 { transactionRequestBodySEPAJSON, transactionRequestWithChargeJSON210, List( - UserNotLoggedIn, - UserNotLoggedIn, + AuthenticatedUserIsRequired, + AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -394,8 +394,8 @@ trait APIMethods210 { transactionRequestBodyFreeFormJSON, transactionRequestWithChargeJSON210, List( - UserNotLoggedIn, - UserNotLoggedIn, + AuthenticatedUserIsRequired, + AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -613,7 +613,7 @@ trait APIMethods210 { challengeAnswerJSON, transactionRequestWithChargeJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -727,7 +727,7 @@ trait APIMethods210 { EmptyBody, transactionRequestWithChargeJSONs210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, AccountNotFound, UserHasMissingRoles, @@ -740,7 +740,7 @@ trait APIMethods210 { cc => if (APIUtil.getPropsAsBoolValue("transactionRequests_enabled", false)) { for { - u <- cc.user ?~ UserNotLoggedIn + u <- cc.user ?~ AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {BankNotFound} (fromAccount, callContext) <- BankAccountX(bankId, accountId, Some(cc)) ?~! {AccountNotFound} view <- APIUtil.checkViewAccessAndReturnView(viewId, BankIdAccountId(bankId, accountId), Some(u), callContext) @@ -773,7 +773,7 @@ trait APIMethods210 { """.stripMargin, EmptyBody, availableRolesJSON, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagRole)) lazy val getRoles: OBPEndpoint = { @@ -808,7 +808,7 @@ trait APIMethods210 { EmptyBody, entitlementJSONs, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -859,7 +859,7 @@ trait APIMethods210 { EmptyBody, consumerJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidConsumerId, UnknownError @@ -872,7 +872,7 @@ trait APIMethods210 { case "management" :: "consumers" :: consumerId :: Nil JsonGet _ => { cc => for { - u <- cc.user ?~! UserNotLoggedIn + u <- cc.user ?~! AuthenticatedUserIsRequired _ <- NewStyle.function.ownEntitlement("", u.userId, ApiRole.canGetConsumers, cc.callContext) consumerIdToLong <- tryo{consumerId.toLong} ?~! InvalidConsumerId @@ -898,7 +898,7 @@ trait APIMethods210 { EmptyBody, consumersJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -910,7 +910,7 @@ trait APIMethods210 { case "management" :: "consumers" :: Nil JsonGet _ => { cc => for { - u <- cc.user ?~! UserNotLoggedIn + u <- cc.user ?~! AuthenticatedUserIsRequired _ <- NewStyle.function.ownEntitlement("", u.userId, ApiRole.canGetConsumers, cc.callContext) consumers <- Some(Consumer.findAll()) } yield { @@ -935,7 +935,7 @@ trait APIMethods210 { putEnabledJSON, putEnabledJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -947,7 +947,7 @@ trait APIMethods210 { case "management" :: "consumers" :: consumerId :: Nil JsonPut json -> _ => { cc => for { - u <- cc.user ?~! UserNotLoggedIn + u <- cc.user ?~! AuthenticatedUserIsRequired putData <- tryo{json.extract[PutEnabledJSON]} ?~! InvalidJsonFormat _ <- putData.enabled match { case true => NewStyle.function.ownEntitlement("", u.userId, ApiRole.canEnableConsumers, cc.callContext) @@ -980,7 +980,7 @@ trait APIMethods210 { postPhysicalCardJSON, physicalCardJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, AllowedValuesAre, UnknownError @@ -1065,7 +1065,7 @@ trait APIMethods210 { EmptyBody, usersJsonV200, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1110,7 +1110,7 @@ trait APIMethods210 { transactionTypeJsonV200, transactionType, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, InsufficientAuthorisationToCreateTransactionType, @@ -1158,7 +1158,7 @@ trait APIMethods210 { |${userAuthenticationMessage(!getAtmsIsPublic)}""".stripMargin, EmptyBody, atmJson, - List(UserNotLoggedIn, BankNotFound, AtmNotFoundByAtmId, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, AtmNotFoundByAtmId, UnknownError), List(apiTagATM, apiTagOldStyle) ) @@ -1170,7 +1170,7 @@ trait APIMethods210 { _ <- if (getAtmsIsPublic) Box(Some(1)) else - cc.user ?~! UserNotLoggedIn + cc.user ?~! AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {BankNotFound} atm <- Box(Atms.atmsProvider.vend.getAtm(bankId, atmId)) ?~! {AtmNotFoundByAtmId} } yield { @@ -1204,7 +1204,7 @@ trait APIMethods210 { EmptyBody, branchJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BranchNotFoundByBranchId, UnknownError ), @@ -1218,7 +1218,7 @@ trait APIMethods210 { _ <- if (getBranchesIsPublic) Box(Some(1)) else - cc.user ?~! UserNotLoggedIn + cc.user ?~! AuthenticatedUserIsRequired (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {BankNotFound} branch <- Box(Branches.branchesProvider.vend.getBranch(bankId, branchId)) ?~! BranchNotFoundByBranchId } yield { @@ -1255,7 +1255,7 @@ trait APIMethods210 { EmptyBody, productJsonV210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, ProductNotFoundByProductCode, UnknownError ), @@ -1302,7 +1302,7 @@ trait APIMethods210 { EmptyBody, productsJsonV210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, ProductNotFoundByProductCode, UnknownError @@ -1355,7 +1355,7 @@ trait APIMethods210 { postCustomerJsonV210, customerJsonV210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, CustomerNumberAlreadyExists, @@ -1378,7 +1378,7 @@ trait APIMethods210 { case "banks" :: BankId(bankId) :: "customers" :: Nil JsonPost json -> _ => { cc => for { - u <- cc.user ?~! UserNotLoggedIn // TODO. CHECK user has role to create a customer / create a customer for another user id. + u <- cc.user ?~! AuthenticatedUserIsRequired // TODO. CHECK user has role to create a customer / create a customer for another user id. _ <- tryo(assert(isValidID(bankId.value)))?~! InvalidBankIdFormat (bank, callContext ) <- BankX(bankId, Some(cc)) ?~! {BankNotFound} postedData <- tryo{json.extract[PostCustomerJsonV210]} ?~! InvalidJsonFormat @@ -1431,7 +1431,7 @@ trait APIMethods210 { EmptyBody, customerJsonV210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1441,7 +1441,7 @@ trait APIMethods210 { case "users" :: "current" :: "customers" :: Nil JsonGet _ => { cc => { for { - u <- cc.user ?~! UserNotLoggedIn + u <- cc.user ?~! AuthenticatedUserIsRequired customers <- tryo{CustomerX.customerProvider.vend.getCustomersByUserId(u.userId)} ?~! UserCustomerLinksNotFoundForUser } yield { val json = JSONFactory210.createCustomersJson(customers) @@ -1465,7 +1465,7 @@ trait APIMethods210 { EmptyBody, customerJSONs, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserCustomerLinksNotFoundForUser, UserCustomerLinksNotFoundForUser, @@ -1508,7 +1508,7 @@ trait APIMethods210 { branchJsonPut, branchJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, UserHasMissingRoles, @@ -1555,7 +1555,7 @@ trait APIMethods210 { branchJsonPost, branchJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, InsufficientAuthorisationToCreateBranch, @@ -1608,7 +1608,7 @@ trait APIMethods210 { consumerRedirectUrlJSON, consumerJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1718,7 +1718,7 @@ trait APIMethods210 { EmptyBody, metricsJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), diff --git a/obp-api/src/main/scala/code/api/v2_2_0/APIMethods220.scala b/obp-api/src/main/scala/code/api/v2_2_0/APIMethods220.scala index 0cc651df42..eeba0a8aaa 100644 --- a/obp-api/src/main/scala/code/api/v2_2_0/APIMethods220.scala +++ b/obp-api/src/main/scala/code/api/v2_2_0/APIMethods220.scala @@ -123,7 +123,7 @@ trait APIMethods220 { EmptyBody, viewsJSONV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError ), @@ -179,7 +179,7 @@ trait APIMethods220 { createViewJsonV121, viewJSONV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, BankAccountNotFound, UnknownError @@ -194,7 +194,7 @@ trait APIMethods220 { createViewJsonV121 <- tryo{json.extract[CreateViewJsonV121]} ?~!InvalidJsonFormat //customer views are started ith `_`,eg _life, _work, and System views startWith letter, eg: owner _<- booleanToBox(isValidCustomViewName(createViewJsonV121.name), InvalidCustomViewFormat+s"Current view_name (${createViewJsonV121.name})") - u <- cc.user ?~!UserNotLoggedIn + u <- cc.user ?~!AuthenticatedUserIsRequired account <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound createViewJson = CreateViewJson( createViewJsonV121.name, @@ -238,7 +238,7 @@ trait APIMethods220 { viewJSONV220, List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError ), @@ -255,7 +255,7 @@ trait APIMethods220 { _ <- booleanToBox(viewId.value.startsWith("_"), InvalidCustomViewFormat+s"Current view_name (${viewId.value})") view <- APIUtil.checkViewAccessAndReturnView(viewId, BankIdAccountId(bankId, accountId), cc.user, Some(cc)) _ <- booleanToBox(!view.isSystem, SystemViewsCanNotBeModified) - u <- cc.user ?~!UserNotLoggedIn + u <- cc.user ?~!AuthenticatedUserIsRequired account <- BankAccountX(bankId, accountId) ?~!BankAccountNotFound updateViewJson = UpdateViewJSON( description = updateJsonV121.description, @@ -309,7 +309,7 @@ trait APIMethods220 { """.stripMargin, EmptyBody, fXRateJSON, - List(InvalidISOCurrencyCode,UserNotLoggedIn,FXCurrencyCodeCombinationsNotSupported, UnknownError), + List(InvalidISOCurrencyCode,AuthenticatedUserIsRequired,FXCurrencyCodeCombinationsNotSupported, UnknownError), List(apiTagFx)) val getCurrentFxRateIsPublic = APIUtil.getPropsAsBoolValue("apiOptions.getCurrentFxRateIsPublic", false) @@ -355,7 +355,7 @@ trait APIMethods220 { EmptyBody, counterpartiesJsonV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, ViewNotFound, NoViewPermission, @@ -413,7 +413,7 @@ trait APIMethods220 { |""".stripMargin, EmptyBody, counterpartyWithMetadataJson, - List(UserNotLoggedIn, BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, UnknownError), List(apiTagCounterparty, apiTagPSD2PIS, apiTagCounterpartyMetaData, apiTagPsd2) ) @@ -493,7 +493,7 @@ trait APIMethods220 { bankJSONV220, List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, InsufficientAuthorisationToCreateBank, UnknownError ), @@ -515,7 +515,7 @@ trait APIMethods220 { _ <- Helper.booleanToBox( !`checkIfContains::::` (bank.id), s"$InvalidJsonFormat BANK_ID can not contain `::::` characters") - u <- cc.user ?~!ErrorMessages.UserNotLoggedIn + u <- cc.user ?~!ErrorMessages.AuthenticatedUserIsRequired consumer <- cc.consumer ?~! ErrorMessages.InvalidConsumerCredentials _ <- NewStyle.function.hasEntitlementAndScope("", u.userId, consumer.id.get.toString, canCreateBank, cc.callContext) success <- Connector.connector.vend.createOrUpdateBank( @@ -577,7 +577,7 @@ trait APIMethods220 { branchJsonV220, branchJsonV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InsufficientAuthorisationToCreateBranch, UnknownError @@ -626,7 +626,7 @@ trait APIMethods220 { atmJsonV220, atmJsonV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError @@ -677,7 +677,7 @@ trait APIMethods220 { productJsonV220, productJsonV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError @@ -754,7 +754,7 @@ trait APIMethods220 { fxJsonV220, fxJsonV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError @@ -828,7 +828,7 @@ trait APIMethods220 { List( InvalidJsonFormat, BankNotFound, - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidUserId, InvalidAccountIdFormat, InvalidBankIdFormat, @@ -933,7 +933,7 @@ trait APIMethods220 { EmptyBody, configurationJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1051,7 +1051,7 @@ trait APIMethods220 { |-----END CERTIFICATE-----""".stripMargin ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -1064,7 +1064,7 @@ trait APIMethods220 { case "management" :: "consumers" :: Nil JsonPost json -> _ => { cc => for { - u <- cc.user ?~! UserNotLoggedIn + u <- cc.user ?~! AuthenticatedUserIsRequired _ <- NewStyle.function.ownEntitlement("", u.userId, ApiRole.canCreateConsumer, cc.callContext) postedJson <- tryo {json.extract[ConsumerPostJSON]} ?~! InvalidJsonFormat consumer <- Consumers.consumers.vend.createConsumer(Some(generateUUID()), @@ -1177,7 +1177,7 @@ trait APIMethods220 { postCounterpartyJSON, counterpartyWithMetadataJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidAccountIdFormat, InvalidBankIdFormat, BankNotFound, @@ -1300,7 +1300,7 @@ trait APIMethods220 { EmptyBody, customerViewsJsonV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, AccountNotFound, ViewNotFound @@ -1336,7 +1336,7 @@ trait APIMethods220 { case "management" :: "connector" :: "metrics" :: Nil JsonGet _ => { cc =>{ for { - u <- user ?~! ErrorMessages.UserNotLoggedIn + u <- user ?~! ErrorMessages.AuthenticatedUserIsRequired _ <- booleanToBox(hasEntitlement("", u.userId, ApiRole.CanGetConnectorMetrics), s"$CanGetConnectorMetrics entitlement required") } yield { diff --git a/obp-api/src/main/scala/code/api/v3_0_0/APIMethods300.scala b/obp-api/src/main/scala/code/api/v3_0_0/APIMethods300.scala index e556b67ea3..aa81d1f8aa 100644 --- a/obp-api/src/main/scala/code/api/v3_0_0/APIMethods300.scala +++ b/obp-api/src/main/scala/code/api/v3_0_0/APIMethods300.scala @@ -126,7 +126,7 @@ trait APIMethods300 { EmptyBody, viewsJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError ), @@ -186,7 +186,7 @@ trait APIMethods300 { SwaggerDefinitionsJSON.createViewJsonV300, viewJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, BankAccountNotFound, UnknownError @@ -239,7 +239,7 @@ trait APIMethods300 { |The user needs to have access to the owner view.""", EmptyBody, viewsJsonV300, - List(UserNotLoggedIn,BankNotFound, AccountNotFound,UnknownError), + List(AuthenticatedUserIsRequired,BankNotFound, AccountNotFound,UnknownError), List(apiTagView, apiTagAccount, apiTagUser)) lazy val getPermissionForUserForBankAccount : OBPEndpoint = { @@ -285,7 +285,7 @@ trait APIMethods300 { viewJsonV300, List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError ), @@ -477,7 +477,7 @@ trait APIMethods300 { |""", EmptyBody, coreAccountsJsonV300, - List(UserNotLoggedIn,UnknownError), + List(AuthenticatedUserIsRequired,UnknownError), List(apiTagAccount, apiTagPSD2AIS, apiTagPrivateData, apiTagPsd2) ) @@ -534,7 +534,7 @@ trait APIMethods300 { |""".stripMargin, EmptyBody, moderatedCoreAccountsJsonV300, - List(UserNotLoggedIn,AccountFirehoseNotAllowedOnThisInstance,UnknownError), + List(AuthenticatedUserIsRequired,AccountFirehoseNotAllowedOnThisInstance,UnknownError), List(apiTagAccount, apiTagAccountFirehose, apiTagFirehoseData), Some(List(canUseAccountFirehoseAtAnyBank, ApiRole.canUseAccountFirehose)) ) @@ -623,7 +623,7 @@ trait APIMethods300 { |""".stripMargin, EmptyBody, transactionsJsonV300, - List(UserNotLoggedIn, AccountFirehoseNotAllowedOnThisInstance, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, AccountFirehoseNotAllowedOnThisInstance, UserHasMissingRoles, UnknownError), List(apiTagTransaction, apiTagAccountFirehose, apiTagTransactionFirehose, apiTagFirehoseData), Some(List(canUseAccountFirehoseAtAnyBank, ApiRole.canUseAccountFirehose)) ) @@ -693,7 +693,7 @@ trait APIMethods300 { FilterOffersetError, FilterLimitError , FilterDateFormatError, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, ViewNotFound, UnknownError @@ -751,7 +751,7 @@ trait APIMethods300 { FilterOffersetError, FilterLimitError , FilterDateFormatError, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, ViewNotFound, UnknownError @@ -824,7 +824,7 @@ trait APIMethods300 { """, elasticSearchJsonV300, emptyElasticSearch, //TODO what is output here? - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagSearchWarehouse), Some(List(canSearchWarehouse))) val esw = new elasticsearchWarehouse @@ -903,7 +903,7 @@ trait APIMethods300 { """, elasticSearchJsonV300, emptyElasticSearch, //TODO what is output here? - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagSearchWarehouse), Some(List(canSearchWarehouseStatistics)) ) @@ -958,7 +958,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, usersJsonV200, - List(UserNotLoggedIn, UserHasMissingRoles, UserNotFoundByEmail, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByEmail, UnknownError), List(apiTagUser), Some(List(canGetAnyUser))) @@ -991,7 +991,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, usersJsonV200, - List(UserNotLoggedIn, UserHasMissingRoles, UserNotFoundById, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundById, UnknownError), List(apiTagUser), Some(List(canGetAnyUser))) @@ -1028,7 +1028,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, usersJsonV200, - List(UserNotLoggedIn, UserHasMissingRoles, UserNotFoundByProviderAndUsername, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByProviderAndUsername, UnknownError), List(apiTagUser), Some(List(canGetAnyUser))) @@ -1064,7 +1064,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, adapterInfoJsonV300, - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagApi), Some(List(canGetAdapterInfoAtOneBank)) ) @@ -1106,7 +1106,7 @@ trait APIMethods300 { branchJsonV300, branchJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InsufficientAuthorisationToCreateBranch, UnknownError @@ -1156,7 +1156,7 @@ trait APIMethods300 { postBranchJsonV300, branchJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InsufficientAuthorisationToCreateBranch, UnknownError @@ -1223,7 +1223,7 @@ trait APIMethods300 { atmJsonV300, atmJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError @@ -1276,7 +1276,7 @@ trait APIMethods300 { EmptyBody, branchJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BranchNotFoundByBranchId, UnknownError ), @@ -1338,7 +1338,7 @@ trait APIMethods300 { EmptyBody, branchesJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, BranchesNotFoundLicense, UnknownError), @@ -1454,7 +1454,7 @@ trait APIMethods300 { |${userAuthenticationMessage(!getAtmsIsPublic)}""".stripMargin, EmptyBody, atmJsonV300, - List(UserNotLoggedIn, BankNotFound, AtmNotFoundByAtmId, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, AtmNotFoundByAtmId, UnknownError), List(apiTagATM) ) lazy val getAtm: OBPEndpoint = { @@ -1496,7 +1496,7 @@ trait APIMethods300 { EmptyBody, atmJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, "No ATMs available. License may not be set.", UnknownError), @@ -1575,7 +1575,7 @@ trait APIMethods300 { EmptyBody, usersJsonV200, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1617,7 +1617,7 @@ trait APIMethods300 { EmptyBody, customersWithAttributesJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1665,7 +1665,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, userJsonV300, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagUser)) lazy val getCurrentUser: OBPEndpoint = { @@ -1700,7 +1700,7 @@ trait APIMethods300 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, coreAccountsJsonV300, - List(UserNotLoggedIn, BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, UnknownError), List(apiTagAccount,apiTagPSD2AIS, apiTagPsd2) ) @@ -1739,7 +1739,7 @@ trait APIMethods300 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, accountsIdsJsonV300, - List(UserNotLoggedIn, BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, UnknownError), List(apiTagAccount, apiTagPSD2AIS, apiTagPsd2) ) @@ -1775,7 +1775,7 @@ trait APIMethods300 { EmptyBody, otherAccountsJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, ViewNotFound, InvalidConnectorResponse, @@ -1812,7 +1812,7 @@ trait APIMethods300 { EmptyBody, otherAccountJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, ViewNotFound, InvalidConnectorResponse, @@ -1860,7 +1860,7 @@ trait APIMethods300 { code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON.createEntitlementJSON, entitlementRequestJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserNotFoundById, InvalidJsonFormat, IncorrectRoleName, @@ -1917,7 +1917,7 @@ trait APIMethods300 { EmptyBody, entitlementRequestsJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidConnectorResponse, UnknownError ), @@ -1956,7 +1956,7 @@ trait APIMethods300 { EmptyBody, entitlementRequestsJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidConnectorResponse, UnknownError ), @@ -1995,7 +1995,7 @@ trait APIMethods300 { EmptyBody, entitlementRequestsJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidConnectorResponse, UnknownError ), @@ -2030,7 +2030,7 @@ trait APIMethods300 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidConnectorResponse, UnknownError ), @@ -2070,7 +2070,7 @@ trait APIMethods300 { EmptyBody, entitlementJSONs, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidConnectorResponse, UnknownError ), @@ -2146,7 +2146,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, coreAccountsHeldJsonV300, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagAccount, apiTagPSD2AIS, apiTagView, apiTagPsd2) ) @@ -2223,7 +2223,7 @@ trait APIMethods300 { EmptyBody, aggregateMetricsJSONV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2269,7 +2269,7 @@ trait APIMethods300 { SwaggerDefinitionsJSON.createScopeJson, scopeJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, ConsumerNotFoundById, InvalidJsonFormat, IncorrectRoleName, @@ -2348,7 +2348,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, EmptyBody, - List(UserNotLoggedIn, EntitlementNotFound, UnknownError), + List(AuthenticatedUserIsRequired, EntitlementNotFound, UnknownError), List(apiTagScope, apiTagConsumer)) lazy val deleteScope: OBPEndpoint = { @@ -2386,7 +2386,7 @@ trait APIMethods300 { """.stripMargin, EmptyBody, scopeJsons, - List(UserNotLoggedIn, EntitlementNotFound, UnknownError), + List(AuthenticatedUserIsRequired, EntitlementNotFound, UnknownError), List(apiTagScope, apiTagConsumer)) lazy val getScopes: OBPEndpoint = { @@ -2453,7 +2453,7 @@ trait APIMethods300 { |* Website""", EmptyBody, bankJson400, - List(UserNotLoggedIn, UnknownError, BankNotFound), + List(AuthenticatedUserIsRequired, UnknownError, BankNotFound), apiTagBank :: apiTagPSD2AIS :: apiTagPsd2 :: Nil ) diff --git a/obp-api/src/main/scala/code/api/v3_1_0/APIMethods310.scala b/obp-api/src/main/scala/code/api/v3_1_0/APIMethods310.scala index 9a31b35fbf..20a28c5987 100644 --- a/obp-api/src/main/scala/code/api/v3_1_0/APIMethods310.scala +++ b/obp-api/src/main/scala/code/api/v3_1_0/APIMethods310.scala @@ -120,7 +120,7 @@ trait APIMethods310 { EmptyBody, checkbookOrdersJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, BankAccountNotFound, InvalidConnectorResponseForGetCheckbookOrdersFuture, @@ -161,7 +161,7 @@ trait APIMethods310 { EmptyBody, creditCardOrderStatusResponseJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, BankAccountNotFound, InvalidConnectorResponseForGetStatusOfCreditCardOrderFuture, @@ -244,7 +244,7 @@ trait APIMethods310 { EmptyBody, topApisJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidFilterParameterFormat, GetTopApisError, @@ -331,7 +331,7 @@ trait APIMethods310 { EmptyBody, topConsumersJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidFilterParameterFormat, GetMetricsTopConsumersError, @@ -392,7 +392,7 @@ trait APIMethods310 { |""".stripMargin, EmptyBody, customerJSONs, - List(UserNotLoggedIn, CustomerFirehoseNotAllowedOnThisInstance, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, CustomerFirehoseNotAllowedOnThisInstance, UserHasMissingRoles, UnknownError), List(apiTagCustomer, apiTagFirehoseData), Some(List(canUseCustomerFirehoseAtAnyBank))) @@ -442,7 +442,7 @@ trait APIMethods310 { |""".stripMargin, EmptyBody, badLoginStatusJson, - List(UserNotLoggedIn, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), List(apiTagUser), Some(List(canReadUserLockedStatus)) ) @@ -481,7 +481,7 @@ trait APIMethods310 { |""".stripMargin, EmptyBody, badLoginStatusJson, - List(UserNotLoggedIn, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), List(apiTagUser), Some(List(canUnlockUser))) @@ -530,7 +530,7 @@ trait APIMethods310 { callLimitPostJson, callLimitPostJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -589,7 +589,7 @@ trait APIMethods310 { EmptyBody, callLimitJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -636,7 +636,7 @@ trait APIMethods310 { EmptyBody, checkFundsAvailableJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, BankAccountNotFound, InvalidAmount, @@ -701,7 +701,7 @@ trait APIMethods310 { EmptyBody, consumerJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, ConsumerNotFoundByConsumerId, UnknownError @@ -738,7 +738,7 @@ trait APIMethods310 { EmptyBody, consumersJson310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UnknownError ), List(apiTagConsumer) @@ -776,7 +776,7 @@ trait APIMethods310 { EmptyBody, consumersJson310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -937,7 +937,7 @@ trait APIMethods310 { EmptyBody, accountWebhooksJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -980,7 +980,7 @@ trait APIMethods310 { EmptyBody, configurationJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1012,7 +1012,7 @@ trait APIMethods310 { """.stripMargin, EmptyBody, adapterInfoJsonV300, - List(UserNotLoggedIn,UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired,UserHasMissingRoles, UnknownError), List(apiTagApi), Some(List(canGetAdapterInfo)) ) @@ -1048,7 +1048,7 @@ trait APIMethods310 { |""", EmptyBody, transactionJsonV300, - List(UserNotLoggedIn, BankAccountNotFound ,ViewNotFound, UserNoPermissionAccessView, UnknownError), + List(AuthenticatedUserIsRequired, BankAccountNotFound ,ViewNotFound, UserNoPermissionAccessView, UnknownError), List(apiTagTransaction)) lazy val getTransactionByIdForBankAccount : OBPEndpoint = { @@ -1106,7 +1106,7 @@ trait APIMethods310 { EmptyBody, transactionRequestWithChargeJSONs210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, BankAccountNotFound, UserNoPermissionAccessView, @@ -1158,7 +1158,7 @@ trait APIMethods310 { postCustomerJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, CustomerNumberAlreadyExists, @@ -1271,7 +1271,7 @@ trait APIMethods310 { EmptyBody, customerWithAttributesJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UserCustomerLinksNotFoundForUser, UnknownError @@ -1314,7 +1314,7 @@ trait APIMethods310 { postCustomerNumberJsonV310, customerWithAttributesJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1358,7 +1358,7 @@ trait APIMethods310 { postUserAuthContextJson, userAuthContextJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, CreateUserAuthContextError, UnknownError @@ -1400,7 +1400,7 @@ trait APIMethods310 { EmptyBody, userAuthContextsJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1439,7 +1439,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1477,7 +1477,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1514,7 +1514,7 @@ trait APIMethods310 { postTaxResidenceJsonV310, taxResidenceV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -1558,7 +1558,7 @@ trait APIMethods310 { EmptyBody, taxResidencesJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1596,7 +1596,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1636,7 +1636,7 @@ trait APIMethods310 { """.stripMargin, EmptyBody, entitlementJSonsV310, - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagRole, apiTagEntitlement)) @@ -1674,7 +1674,7 @@ trait APIMethods310 { postCustomerAddressJsonV310, customerAddressJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -1731,7 +1731,7 @@ trait APIMethods310 { postCustomerAddressJsonV310, customerAddressJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -1786,7 +1786,7 @@ trait APIMethods310 { EmptyBody, customerAddressesJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1825,7 +1825,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2229,7 +2229,7 @@ trait APIMethods310 { EmptyBody, accountApplicationsJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2272,7 +2272,7 @@ trait APIMethods310 { EmptyBody, accountApplicationResponseJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2318,7 +2318,7 @@ trait APIMethods310 { accountApplicationUpdateStatusJson, accountApplicationResponseJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2409,7 +2409,7 @@ trait APIMethods310 { postPutProductJsonV310, productJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError @@ -2483,7 +2483,7 @@ trait APIMethods310 { EmptyBody, productJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, ProductNotFoundByProductCode, UnknownError ), @@ -2538,7 +2538,7 @@ trait APIMethods310 { EmptyBody, childProductTreeJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, ProductNotFoundByProductCode, UnknownError ), @@ -2591,7 +2591,7 @@ trait APIMethods310 { EmptyBody, productsJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, ProductNotFoundByProductCode, UnknownError @@ -2664,7 +2664,7 @@ trait APIMethods310 { accountAttributeJson, accountAttributeResponseJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -2737,7 +2737,7 @@ trait APIMethods310 { accountAttributeJson, accountAttributeResponseJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -2820,7 +2820,7 @@ trait APIMethods310 { putProductCollectionsV310, productCollectionsJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UserHasMissingRoles, UnknownError @@ -2879,7 +2879,7 @@ trait APIMethods310 { EmptyBody, productCollectionJsonTreeV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -2921,7 +2921,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InsufficientAuthorisationToDeleteBranch, UnknownError @@ -2969,7 +2969,7 @@ trait APIMethods310 { createMeetingJsonV310, meetingJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, UnknownError @@ -2989,7 +2989,7 @@ trait APIMethods310 { // These following are only for `tokbox` stuff, for now, just ignore it. // _ <- APIUtil.getPropsValue("meeting.tokbox_api_key") ~> APIFailure(MeetingApiKeyNotConfigured, 403) // _ <- APIUtil.getPropsValue("meeting.tokbox_api_secret") ~> APIFailure(MeetingApiSecretNotConfigured, 403) - // u <- cc.user ?~! UserNotLoggedIn + // u <- cc.user ?~! AuthenticatedUserIsRequired // _ <- tryo(assert(isValidID(bankId.value)))?~! InvalidBankIdFormat // (bank, callContext) <- Bank(bankId, Some(cc)) ?~! BankNotFound // postedData <- tryo {json.extract[CreateMeetingJson]} ?~! InvalidJsonFormat @@ -3047,7 +3047,7 @@ trait APIMethods310 { EmptyBody, meetingsJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError), List(apiTagMeeting, apiTagCustomer, apiTagExperimental)) @@ -3085,7 +3085,7 @@ trait APIMethods310 { EmptyBody, meetingJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, MeetingNotFound, UnknownError @@ -3327,7 +3327,7 @@ trait APIMethods310 { postConsentEmailJsonV310, consentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, ConsentAllowedScaMethods, @@ -3406,7 +3406,7 @@ trait APIMethods310 { postConsentPhoneJsonV310, consentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, ConsentAllowedScaMethods, @@ -3484,7 +3484,7 @@ trait APIMethods310 { postConsentImplicitJsonV310, consentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, ConsentAllowedScaMethods, @@ -3687,7 +3687,7 @@ trait APIMethods310 { status = "INITIATED" ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, InvalidConnectorResponse, @@ -3730,7 +3730,7 @@ trait APIMethods310 { EmptyBody, consentsJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -3775,7 +3775,7 @@ trait APIMethods310 { EmptyBody, revokedConsentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -3820,7 +3820,7 @@ trait APIMethods310 { postUserAuthContextJson, userAuthContextUpdateJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, CreateUserAuthContextError, UnknownError @@ -3866,7 +3866,7 @@ trait APIMethods310 { PostUserAuthContextUpdateJsonV310(answer = "12345678"), userAuthContextUpdateJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, InvalidConnectorResponse, @@ -3931,7 +3931,7 @@ trait APIMethods310 { EmptyBody, viewJSONV220, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -3979,7 +3979,7 @@ trait APIMethods310 { SwaggerDefinitionsJSON.createSystemViewJsonV300, viewJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -4023,7 +4023,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "user does not have owner access" @@ -4065,7 +4065,7 @@ trait APIMethods310 { viewJsonV300, List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError ), @@ -4151,7 +4151,7 @@ trait APIMethods310 { ) , List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4253,7 +4253,7 @@ trait APIMethods310 { Some("this-method-routing-Id") ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, InvalidConnectorName, @@ -4356,7 +4356,7 @@ trait APIMethods310 { MethodRoutingCommons("getBank", "rest_vMar2019", true, Some("some_bankId"), List(MethodRoutingParam("url", "http://mydomain.com/xxx"))), MethodRoutingCommons("getBank", "rest_vMar2019", true, Some("some_bankId"), List(MethodRoutingParam("url", "http://mydomain.com/xxx")), Some("this-method-routing-Id")), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, InvalidConnectorName, @@ -4434,7 +4434,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4472,7 +4472,7 @@ trait APIMethods310 { putUpdateCustomerEmailJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4521,7 +4521,7 @@ trait APIMethods310 { putUpdateCustomerNumberJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4576,7 +4576,7 @@ trait APIMethods310 { putUpdateCustomerMobileNumberJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4625,7 +4625,7 @@ trait APIMethods310 { putUpdateCustomerIdentityJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4682,7 +4682,7 @@ trait APIMethods310 { putUpdateCustomerCreditLimitJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4731,7 +4731,7 @@ trait APIMethods310 { putUpdateCustomerCreditRatingAndSourceJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4778,7 +4778,7 @@ trait APIMethods310 { """.stripMargin, updateAccountRequestJsonV310, updateAccountResponseJsonV310, - List(InvalidJsonFormat, UserNotLoggedIn, UnknownError, BankAccountNotFound), + List(InvalidJsonFormat, AuthenticatedUserIsRequired, UnknownError, BankAccountNotFound), List(apiTagAccount), Some(List(canUpdateAccount)) ) @@ -4841,7 +4841,7 @@ trait APIMethods310 { createPhysicalCardJsonV310, physicalCardJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, AllowedValuesAre, UnknownError @@ -4936,7 +4936,7 @@ trait APIMethods310 { updatePhysicalCardJsonV310, physicalCardJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, AllowedValuesAre, UnknownError @@ -5021,7 +5021,7 @@ trait APIMethods310 { |${userAuthenticationMessage(true)}""".stripMargin, EmptyBody, physicalCardsJsonV310, - List(UserNotLoggedIn,BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired,BankNotFound, UnknownError), List(apiTagCard)) lazy val getCardsForBank : OBPEndpoint = { case "management" :: "banks" :: BankId(bankId) :: "cards" :: Nil JsonGet _ => { @@ -5056,7 +5056,7 @@ trait APIMethods310 { """.stripMargin, EmptyBody, physicalCardWithAttributesJsonV310, - List(UserNotLoggedIn,BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired,BankNotFound, UnknownError), List(apiTagCard), Some(List(canGetCardsForBank))) lazy val getCardForBank : OBPEndpoint = { @@ -5092,7 +5092,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, AllowedValuesAre, UnknownError @@ -5144,7 +5144,7 @@ trait APIMethods310 { CardAttributeType.DOUBLE, cardAttributeValueExample.value), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -5215,7 +5215,7 @@ trait APIMethods310 { CardAttributeType.DOUBLE, cardAttributeValueExample.value), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -5273,7 +5273,7 @@ trait APIMethods310 { putCustomerBranchJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5329,7 +5329,7 @@ trait APIMethods310 { putUpdateCustomerDataJsonV310, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5394,7 +5394,7 @@ trait APIMethods310 { List( InvalidJsonFormat, BankNotFound, - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidUserId, InvalidAccountIdFormat, InvalidBankIdFormat, @@ -5788,7 +5788,7 @@ trait APIMethods310 { ) , List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5879,7 +5879,7 @@ trait APIMethods310 { WebUiPropsCommons("webui_api_explorer_url", "https://apiexplorer.openbankproject.com"), WebUiPropsCommons( "webui_api_explorer_url", "https://apiexplorer.openbankproject.com", Some("some-web-ui-props-id")), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5925,7 +5925,7 @@ trait APIMethods310 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5990,7 +5990,7 @@ trait APIMethods310 { putEnabledJSON, putEnabledJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), diff --git a/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala b/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala index fa4a35a628..1e52b797a6 100644 --- a/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala +++ b/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala @@ -195,7 +195,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, adapterInfoJsonV300, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), List(apiTagApi), Some(List(canGetDatabaseInfo)) ) @@ -227,7 +227,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, logoutLinkV400, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), List(apiTagUser) ) @@ -269,7 +269,7 @@ trait APIMethods400 extends MdcLoggable { callLimitPostJsonV400, callLimitPostJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -454,7 +454,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, doubleEntryTransactionJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -519,7 +519,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, doubleEntryTransactionJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -584,7 +584,7 @@ trait APIMethods400 extends MdcLoggable { settlementAccountResponseJson, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, $BankNotFound, InvalidAccountInitialBalance, @@ -769,7 +769,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, settlementAccountsJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, $BankNotFound, UnknownError @@ -833,7 +833,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyJsonV200, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -870,7 +870,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyJsonV200, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -916,7 +916,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyCounterpartyJSON, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -954,7 +954,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodySimpleJsonV400, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -993,7 +993,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodySEPAJsonV400, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -1038,7 +1038,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyRefundJsonV400, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -1071,7 +1071,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyFreeFormJSON, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -1117,7 +1117,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyAgentJsonV400, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -1293,7 +1293,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestBodyCardJsonV400, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -1377,7 +1377,7 @@ trait APIMethods400 extends MdcLoggable { challengeAnswerJson400, transactionRequestWithChargeJSON210, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, InvalidAccountIdFormat, InvalidJsonFormat, @@ -1667,7 +1667,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestAttributeJsonV400, transactionRequestAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -1739,7 +1739,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionRequestAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -1793,7 +1793,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionRequestAttributesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -1847,7 +1847,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestAttributeJsonV400, transactionRequestAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -1931,7 +1931,7 @@ trait APIMethods400 extends MdcLoggable { transactionRequestAttributeDefinitionJsonV400, transactionRequestAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -2008,7 +2008,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionRequestAttributeDefinitionsResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -2055,7 +2055,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -2101,7 +2101,7 @@ trait APIMethods400 extends MdcLoggable { List(dynamicEntityResponseBodyExample) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2147,7 +2147,7 @@ trait APIMethods400 extends MdcLoggable { ), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2389,7 +2389,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEntityRequestBodyExample.copy(bankId = None), dynamicEntityResponseBodyExample.copy(bankId = None), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -2593,7 +2593,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEntityResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -2702,7 +2702,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEntityRequestBodyExample.copy(bankId = None), dynamicEntityResponseBodyExample.copy(bankId = None), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEntityNotFoundByDynamicEntityId, InvalidJsonFormat, @@ -2753,7 +2753,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEntityResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -2786,7 +2786,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2863,7 +2863,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2896,7 +2896,7 @@ trait APIMethods400 extends MdcLoggable { List(dynamicEntityResponseBodyExample) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagManageDynamicEntity, apiTagApi) @@ -2953,7 +2953,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEntityRequestBodyExample.copy(bankId = None), dynamicEntityResponseBodyExample, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, DynamicEntityNotFoundByDynamicEntityId, UnknownError @@ -3035,7 +3035,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagManageDynamicEntity, apiTagApi) @@ -3125,7 +3125,7 @@ trait APIMethods400 extends MdcLoggable { "https://apisandbox.openbankproject.com/user_mgt/reset_password/QOL1CPNJPCZ4BRMPX3Z01DPOX1HMGU3L" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -3191,7 +3191,7 @@ trait APIMethods400 extends MdcLoggable { createAccountResponseJsonV310, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidAccountBalanceAmount, InvalidAccountInitialBalance, @@ -3397,7 +3397,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), List(apiTagApi), Some(List(canGetCallContext)) ) @@ -3425,7 +3425,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), List(apiTagApi), Some(Nil) ) @@ -3459,7 +3459,7 @@ trait APIMethods400 extends MdcLoggable { successMessage, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError, $BankAccountNotFound, @@ -3534,7 +3534,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userLockStatusJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError @@ -3604,7 +3604,7 @@ trait APIMethods400 extends MdcLoggable { postCreateUserWithRolesJsonV400, entitlementsJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, IncorrectRoleName, EntitlementIsBankRole, @@ -3703,7 +3703,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, entitlementsJsonV400, - List($UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List($AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagRole, apiTagEntitlement, apiTagUser), Some(List(canGetEntitlementsForAnyUserAtAnyBank)) ) @@ -3742,7 +3742,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, entitlementsJsonV400, - List($UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List($AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagRole, apiTagEntitlement, apiTagUser), Some(List(canGetEntitlementsForOneBank, canGetEntitlementsForAnyBank)) ) @@ -3781,7 +3781,7 @@ trait APIMethods400 extends MdcLoggable { postAccountTagJSON, accountTagJSON, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -3853,7 +3853,7 @@ trait APIMethods400 extends MdcLoggable { List( NoViewPermission, ViewNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -3905,7 +3905,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, accountTagsJSON, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, NoViewPermission, @@ -3966,7 +3966,7 @@ trait APIMethods400 extends MdcLoggable { |""".stripMargin, EmptyBody, moderatedCoreAccountJsonV400, - List($UserNotLoggedIn, $BankAccountNotFound, UnknownError), + List($AuthenticatedUserIsRequired, $BankAccountNotFound, UnknownError), apiTagAccount :: apiTagPSD2AIS :: apiTagPsd2 :: Nil ) lazy val getCoreAccountById: OBPEndpoint = { @@ -4028,7 +4028,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, moderatedAccountJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4096,7 +4096,7 @@ trait APIMethods400 extends MdcLoggable { bankAccountRoutingJson, moderatedAccountJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4201,7 +4201,7 @@ trait APIMethods400 extends MdcLoggable { bankAccountRoutingJson, moderatedAccountsJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4296,7 +4296,7 @@ trait APIMethods400 extends MdcLoggable { """Get the Balances for the Accounts of the current User at one bank.""", EmptyBody, accountBalancesV400Json, - List($UserNotLoggedIn, $BankNotFound, UnknownError), + List($AuthenticatedUserIsRequired, $BankNotFound, UnknownError), apiTagAccount :: apiTagPSD2AIS :: apiTagPsd2 :: Nil ) @@ -4326,7 +4326,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, accountBalanceV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, CannotFindAccountAccess, UnknownError @@ -4575,7 +4575,7 @@ trait APIMethods400 extends MdcLoggable { postCustomerPhoneNumberJsonV400, customerJsonV310, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -4627,7 +4627,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, userIdJsonV400, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagUser) ) @@ -4663,7 +4663,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundById, UnknownError @@ -4736,7 +4736,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByProviderAndUsername, UnknownError @@ -4795,7 +4795,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, usersJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByEmail, UnknownError @@ -4839,7 +4839,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, usersJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4895,7 +4895,7 @@ trait APIMethods400 extends MdcLoggable { userInvitationPostJsonV400, userInvitationJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserCustomerLinksNotFoundForUser, UnknownError @@ -5113,7 +5113,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userInvitationJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -5157,7 +5157,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userInvitationJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -5200,7 +5200,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5249,7 +5249,7 @@ trait APIMethods400 extends MdcLoggable { bankJson400, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InsufficientAuthorisationToCreateBank, UnknownError ), @@ -5388,7 +5388,7 @@ trait APIMethods400 extends MdcLoggable { postDirectDebitJsonV400, directDebitJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, NoViewPermission, @@ -5474,7 +5474,7 @@ trait APIMethods400 extends MdcLoggable { postDirectDebitJsonV400, directDebitJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, NoViewPermission, @@ -5552,7 +5552,7 @@ trait APIMethods400 extends MdcLoggable { postStandingOrderJsonV400, standingOrderJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, NoViewPermission, @@ -5660,7 +5660,7 @@ trait APIMethods400 extends MdcLoggable { postStandingOrderJsonV400, standingOrderJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, NoViewPermission, @@ -5757,7 +5757,7 @@ trait APIMethods400 extends MdcLoggable { postAccountAccessJsonV400, viewJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserLacksPermissionCanGrantAccessToViewForTargetAccount, InvalidJsonFormat, UserNotFoundById, @@ -5845,7 +5845,7 @@ trait APIMethods400 extends MdcLoggable { postCreateUserAccountAccessJsonV400, List(viewJsonV300), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserLacksPermissionCanGrantAccessToViewForTargetAccount, InvalidJsonFormat, SystemViewNotFound, @@ -5932,7 +5932,7 @@ trait APIMethods400 extends MdcLoggable { postAccountAccessJsonV400, revokedJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserLacksPermissionCanRevokeAccessToViewForTargetAccount, InvalidJsonFormat, UserNotFoundById, @@ -6024,7 +6024,7 @@ trait APIMethods400 extends MdcLoggable { postRevokeGrantAccountAccessJsonV400, revokedJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserLacksPermissionCanGrantAccessToViewForTargetAccount, InvalidJsonFormat, UserNotFoundById, @@ -6102,7 +6102,7 @@ trait APIMethods400 extends MdcLoggable { customerAttributeJsonV400, customerAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -6182,7 +6182,7 @@ trait APIMethods400 extends MdcLoggable { customerAttributeJsonV400, customerAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -6266,7 +6266,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, customerAttributesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -6323,7 +6323,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, customerAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -6381,7 +6381,7 @@ trait APIMethods400 extends MdcLoggable { List(customerWithAttributesJsonV310) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserCustomerLinksNotFoundForUser, UnknownError @@ -6441,7 +6441,7 @@ trait APIMethods400 extends MdcLoggable { transactionAttributeJsonV400, transactionAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -6514,7 +6514,7 @@ trait APIMethods400 extends MdcLoggable { transactionAttributeJsonV400, transactionAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -6593,7 +6593,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionAttributesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -6647,7 +6647,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -6875,7 +6875,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionRequestWithChargeJSON210, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -6938,7 +6938,7 @@ trait APIMethods400 extends MdcLoggable { """.stripMargin, EmptyBody, basicAccountsJSON, - List($UserNotLoggedIn, $BankNotFound, UnknownError), + List($AuthenticatedUserIsRequired, $BankNotFound, UnknownError), List(apiTagAccount, apiTagPrivateData, apiTagPublicData) ) @@ -7006,7 +7006,7 @@ trait APIMethods400 extends MdcLoggable { ), consumerJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -7079,7 +7079,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, customersJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -7126,7 +7126,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, customersMinimalJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -7173,7 +7173,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, scopeJsons, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, EntitlementNotFound, ConsumerNotFoundByConsumerId, UnknownError @@ -7232,7 +7232,7 @@ trait APIMethods400 extends MdcLoggable { SwaggerDefinitionsJSON.createScopeJson, scopeJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, ConsumerNotFoundById, InvalidJsonFormat, IncorrectRoleName, @@ -7342,7 +7342,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -7390,7 +7390,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEndpointRequestBodyExample, dynamicEndpointResponseBodyExample, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEndpointExists, InvalidJsonFormat, @@ -7430,7 +7430,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEndpointResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEndpointExists, InvalidJsonFormat, @@ -7462,7 +7462,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEndpointHostJson400, dynamicEndpointHostJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEntityNotFoundByDynamicEntityId, InvalidJsonFormat, @@ -7523,7 +7523,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEndpointHostJson400, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEntityNotFoundByDynamicEntityId, InvalidJsonFormat, @@ -7562,7 +7562,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, dynamicEndpointResponseBodyExample, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEndpointNotFoundByDynamicEndpointId, InvalidJsonFormat, @@ -7598,7 +7598,7 @@ trait APIMethods400 extends MdcLoggable { List(dynamicEndpointResponseBodyExample) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -7652,7 +7652,7 @@ trait APIMethods400 extends MdcLoggable { dynamicEndpointResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, DynamicEndpointNotFoundByDynamicEndpointId, InvalidJsonFormat, @@ -7710,7 +7710,7 @@ trait APIMethods400 extends MdcLoggable { ), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -7754,7 +7754,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, DynamicEndpointNotFoundByDynamicEndpointId, UnknownError ), @@ -7782,7 +7782,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, DynamicEndpointNotFoundByDynamicEndpointId, UnknownError ), @@ -7812,7 +7812,7 @@ trait APIMethods400 extends MdcLoggable { List(dynamicEndpointResponseBodyExample) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -7853,7 +7853,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, DynamicEndpointNotFoundByDynamicEndpointId, UnknownError ), @@ -7904,7 +7904,7 @@ trait APIMethods400 extends MdcLoggable { templateAttributeDefinitionJsonV400, templateAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -7984,7 +7984,7 @@ trait APIMethods400 extends MdcLoggable { accountAttributeDefinitionJsonV400, accountAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -8064,7 +8064,7 @@ trait APIMethods400 extends MdcLoggable { productAttributeDefinitionJsonV400, productAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -8381,7 +8381,7 @@ trait APIMethods400 extends MdcLoggable { productFeeJsonV400.copy(product_fee_id = None), productFeeResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -8444,7 +8444,7 @@ trait APIMethods400 extends MdcLoggable { productFeeJsonV400.copy(product_fee_id = None), productFeeResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -8594,7 +8594,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, BooleanBody(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -8641,7 +8641,7 @@ trait APIMethods400 extends MdcLoggable { bankAttributeDefinitionJsonV400, bankAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -8796,7 +8796,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, bankAttributesResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -8832,7 +8832,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, bankAttributeResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -9000,7 +9000,7 @@ trait APIMethods400 extends MdcLoggable { transactionAttributeDefinitionJsonV400, transactionAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -9080,7 +9080,7 @@ trait APIMethods400 extends MdcLoggable { cardAttributeDefinitionJsonV400, cardAttributeDefinitionResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -9156,7 +9156,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9199,7 +9199,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9240,7 +9240,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9281,7 +9281,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9322,7 +9322,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9363,7 +9363,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, productAttributeDefinitionsResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9405,7 +9405,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, customerAttributeDefinitionsResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9447,7 +9447,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, accountAttributeDefinitionsResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9489,7 +9489,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, transactionAttributeDefinitionsResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9536,7 +9536,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, cardAttributeDefinitionsResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9578,7 +9578,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -9620,7 +9620,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userCustomerLinksJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9664,7 +9664,7 @@ trait APIMethods400 extends MdcLoggable { createUserCustomerLinkJson, userCustomerLinkJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidBankIdFormat, $BankNotFound, InvalidJsonFormat, @@ -9761,7 +9761,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userCustomerLinksJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9804,7 +9804,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, customerAndUsersWithAttributesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9862,7 +9862,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, correlatedUsersResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -9941,7 +9941,7 @@ trait APIMethods400 extends MdcLoggable { postCustomerJsonV310, customerJsonV310, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, CustomerNumberAlreadyExists, @@ -10032,7 +10032,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, accountsMinimalJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, CustomerNotFound, UnknownError ), @@ -10087,7 +10087,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, UserHasMissingRoles, @@ -10141,7 +10141,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, UserHasMissingRoles, @@ -10183,7 +10183,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -10221,7 +10221,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, UserHasMissingRoles, @@ -10265,7 +10265,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, CustomerNotFoundByCustomerId, UserHasMissingRoles, @@ -10311,7 +10311,7 @@ trait APIMethods400 extends MdcLoggable { postCounterpartyJson400, counterpartyWithMetadataJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidAccountIdFormat, InvalidBankIdFormat, $BankNotFound, @@ -10543,7 +10543,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidAccountIdFormat, InvalidBankIdFormat, $BankNotFound, @@ -10614,7 +10614,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankAccountNotFound, $BankNotFound, InvalidAccountIdFormat, @@ -10680,7 +10680,7 @@ trait APIMethods400 extends MdcLoggable { postCounterpartyJson400, counterpartyWithMetadataJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidAccountIdFormat, InvalidBankIdFormat, $BankNotFound, @@ -10893,7 +10893,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, counterpartiesJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -10972,7 +10972,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, counterpartiesJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, UnknownError @@ -11042,7 +11042,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, counterpartyWithMetadataJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -11110,7 +11110,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, counterpartyWithMetadataJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidAccountIdFormat, InvalidBankIdFormat, $BankNotFound, @@ -11194,7 +11194,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, counterpartyWithMetadataJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidAccountIdFormat, InvalidBankIdFormat, $BankNotFound, @@ -11261,7 +11261,7 @@ trait APIMethods400 extends MdcLoggable { status = "AUTHORISED" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, $BankNotFound, ConsentUserAlreadyAdded, @@ -11351,7 +11351,7 @@ trait APIMethods400 extends MdcLoggable { status = "AUTHORISED" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, InvalidConnectorResponse, @@ -11422,7 +11422,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, consentsJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -11466,7 +11466,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, consentInfosJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -11512,7 +11512,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, consentInfosJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -11552,7 +11552,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userAttributesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagUser) @@ -11587,7 +11587,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, userWithAttributesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagUser), @@ -11632,7 +11632,7 @@ trait APIMethods400 extends MdcLoggable { userAttributeJsonV400, userAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -11694,7 +11694,7 @@ trait APIMethods400 extends MdcLoggable { userAttributeJsonV400, userAttributeResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -11798,7 +11798,7 @@ trait APIMethods400 extends MdcLoggable { postApiCollectionJson400, apiCollectionJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UserNotFoundByUserId, UnknownError @@ -11861,7 +11861,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -11902,7 +11902,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12052,7 +12052,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionsJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagApiCollection) @@ -12092,7 +12092,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12134,7 +12134,7 @@ trait APIMethods400 extends MdcLoggable { postApiCollectionEndpointJson400, apiCollectionEndpointJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -12215,7 +12215,7 @@ trait APIMethods400 extends MdcLoggable { postApiCollectionEndpointJson400, apiCollectionEndpointJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -12290,7 +12290,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionEndpointJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12339,7 +12339,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionEndpointsJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagApiCollection) @@ -12377,7 +12377,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionEndpointsJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12425,7 +12425,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, apiCollectionEndpointsJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12473,7 +12473,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12525,7 +12525,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12573,7 +12573,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -12622,7 +12622,7 @@ trait APIMethods400 extends MdcLoggable { postOrPutJsonSchemaV400, responseJsonSchema, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -12686,7 +12686,7 @@ trait APIMethods400 extends MdcLoggable { postOrPutJsonSchemaV400, responseJsonSchema, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -12741,7 +12741,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, BooleanBody(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -12820,7 +12820,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, ListResult("json_schema_validations", responseJsonSchema :: Nil), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -12861,7 +12861,7 @@ trait APIMethods400 extends MdcLoggable { |""", EmptyBody, ListResult("json_schema_validations", responseJsonSchema :: Nil), - (if (jsonSchemaValidationRequiresRole) List($UserNotLoggedIn) else Nil) + (if (jsonSchemaValidationRequiresRole) List($AuthenticatedUserIsRequired) else Nil) ::: List( UserHasMissingRoles, InvalidJsonFormat, @@ -12888,7 +12888,7 @@ trait APIMethods400 extends MdcLoggable { allowedAuthTypes, JsonAuthTypeValidation("OBPv4.0.0-updateXxx", allowedAuthTypes), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -12946,7 +12946,7 @@ trait APIMethods400 extends MdcLoggable { allowedAuthTypes, JsonAuthTypeValidation("OBPv4.0.0-updateXxx", allowedAuthTypes), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13004,7 +13004,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, BooleanBody(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13089,7 +13089,7 @@ trait APIMethods400 extends MdcLoggable { List(JsonAuthTypeValidation("OBPv4.0.0-updateXxx", allowedAuthTypes)) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13141,7 +13141,7 @@ trait APIMethods400 extends MdcLoggable { "authentication_types_validations", List(JsonAuthTypeValidation("OBPv4.0.0-updateXxx", allowedAuthTypes)) ), - (if (authenticationTypeValidationRequiresRole) List($UserNotLoggedIn) + (if (authenticationTypeValidationRequiresRole) List($AuthenticatedUserIsRequired) else Nil) ::: List( UserHasMissingRoles, @@ -13166,7 +13166,7 @@ trait APIMethods400 extends MdcLoggable { jsonScalaConnectorMethod.copy(connectorMethodId = None), jsonScalaConnectorMethod, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13235,7 +13235,7 @@ trait APIMethods400 extends MdcLoggable { jsonScalaConnectorMethodMethodBody, jsonScalaConnectorMethod, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13301,7 +13301,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, jsonScalaConnectorMethod, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -13335,7 +13335,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, ListResult("connectors_methods", jsonScalaConnectorMethod :: Nil), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -13372,7 +13372,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicResourceDoc.copy(dynamicResourceDocId = None), jsonDynamicResourceDoc, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13485,7 +13485,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicResourceDoc.copy(dynamicResourceDocId = None), jsonDynamicResourceDoc, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13586,7 +13586,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, BooleanBody(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13630,7 +13630,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, jsonDynamicResourceDoc, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -13668,7 +13668,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, ListResult("dynamic-resource-docs", jsonDynamicResourceDoc :: Nil), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -13706,7 +13706,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicResourceDoc, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13836,7 +13836,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicResourceDoc, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13954,7 +13954,7 @@ trait APIMethods400 extends MdcLoggable { BooleanBody(true), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -13999,7 +13999,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicResourceDoc, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14038,7 +14038,7 @@ trait APIMethods400 extends MdcLoggable { ListResult("dynamic-resource-docs", jsonDynamicResourceDoc :: Nil), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14079,7 +14079,7 @@ trait APIMethods400 extends MdcLoggable { jsonResourceDocFragment, jsonCodeTemplateJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -14151,7 +14151,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicMessageDoc.copy(dynamicMessageDocId = None), jsonDynamicMessageDoc, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14218,7 +14218,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicMessageDoc, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14288,7 +14288,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicMessageDoc.copy(dynamicMessageDocId = None), jsonDynamicMessageDoc, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14356,7 +14356,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, jsonDynamicMessageDoc, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14394,7 +14394,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, ListResult("dynamic-message-docs", jsonDynamicMessageDoc :: Nil), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14429,7 +14429,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, BooleanBody(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14473,7 +14473,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicMessageDoc, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14542,7 +14542,7 @@ trait APIMethods400 extends MdcLoggable { jsonDynamicMessageDoc, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14581,7 +14581,7 @@ trait APIMethods400 extends MdcLoggable { ListResult("dynamic-message-docs", jsonDynamicMessageDoc :: Nil), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14618,7 +14618,7 @@ trait APIMethods400 extends MdcLoggable { BooleanBody(true), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14663,7 +14663,7 @@ trait APIMethods400 extends MdcLoggable { endpointMappingRequestBodyExample, endpointMappingResponseBodyExample, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14720,7 +14720,7 @@ trait APIMethods400 extends MdcLoggable { endpointMappingRequestBodyExample, endpointMappingResponseBodyExample, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14788,7 +14788,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, endpointMappingResponseBodyExample, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14834,7 +14834,7 @@ trait APIMethods400 extends MdcLoggable { endpointMappingResponseBodyExample :: Nil ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -14877,7 +14877,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, BooleanBody(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14925,7 +14925,7 @@ trait APIMethods400 extends MdcLoggable { endpointMappingResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14955,7 +14955,7 @@ trait APIMethods400 extends MdcLoggable { endpointMappingResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -14986,7 +14986,7 @@ trait APIMethods400 extends MdcLoggable { endpointMappingResponseBodyExample, List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -15019,7 +15019,7 @@ trait APIMethods400 extends MdcLoggable { ), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -15048,7 +15048,7 @@ trait APIMethods400 extends MdcLoggable { BooleanBody(true), List( $BankNotFound, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -15077,7 +15077,7 @@ trait APIMethods400 extends MdcLoggable { supportedCurrenciesJson, atmSupportedCurrenciesJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15132,7 +15132,7 @@ trait APIMethods400 extends MdcLoggable { supportedLanguagesJson, atmSupportedLanguagesJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15187,7 +15187,7 @@ trait APIMethods400 extends MdcLoggable { accessibilityFeaturesJson, atmAccessibilityFeaturesJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15243,7 +15243,7 @@ trait APIMethods400 extends MdcLoggable { atmServicesJson, atmServicesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15298,7 +15298,7 @@ trait APIMethods400 extends MdcLoggable { atmNotesJson, atmNotesResponseJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15353,7 +15353,7 @@ trait APIMethods400 extends MdcLoggable { atmLocationCategoriesJsonV400, atmLocationCategoriesResponseJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15407,7 +15407,7 @@ trait APIMethods400 extends MdcLoggable { atmJsonV400, atmJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15462,7 +15462,7 @@ trait APIMethods400 extends MdcLoggable { atmJsonV400.copy(id = None), atmJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15522,7 +15522,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagATM), @@ -15634,7 +15634,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, atmJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -15676,7 +15676,7 @@ trait APIMethods400 extends MdcLoggable { endpointTagJson400, bankLevelEndpointTagResponseJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -15743,7 +15743,7 @@ trait APIMethods400 extends MdcLoggable { endpointTagJson400, bankLevelEndpointTagResponseJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, EndpointTagNotFoundByEndpointTagId, InvalidJsonFormat, @@ -15812,7 +15812,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, bankLevelEndpointTagResponseJson400 :: Nil, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -15852,7 +15852,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -15895,7 +15895,7 @@ trait APIMethods400 extends MdcLoggable { endpointTagJson400, bankLevelEndpointTagResponseJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, InvalidJsonFormat, @@ -15966,7 +15966,7 @@ trait APIMethods400 extends MdcLoggable { endpointTagJson400, bankLevelEndpointTagResponseJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, EndpointTagNotFoundByEndpointTagId, @@ -16039,7 +16039,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, bankLevelEndpointTagResponseJson400 :: Nil, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -16081,7 +16081,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, Full(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -16120,7 +16120,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, mySpaces, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagUser) @@ -16174,7 +16174,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, productsJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -16234,7 +16234,7 @@ trait APIMethods400 extends MdcLoggable { putProductJsonV400, productJsonV400.copy(attributes = None, fees = None), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -16319,7 +16319,7 @@ trait APIMethods400 extends MdcLoggable { EmptyBody, productJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound, ProductNotFoundByProductCode, UnknownError @@ -16382,7 +16382,7 @@ trait APIMethods400 extends MdcLoggable { createMessageJsonV400, successMessage, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound ), List(apiTagMessage, apiTagCustomer, apiTagPerson), @@ -16437,7 +16437,7 @@ trait APIMethods400 extends MdcLoggable { """, EmptyBody, customerMessagesJsonV400, - List(UserNotLoggedIn, $BankNotFound, UnknownError), + List(AuthenticatedUserIsRequired, $BankNotFound, UnknownError), List(apiTagMessage, apiTagCustomer), Some(List(canGetCustomerMessages)) ) @@ -16588,7 +16588,7 @@ trait APIMethods400 extends MdcLoggable { accountNotificationWebhookPostJson, bankAccountNotificationWebhookJson, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), 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 77790a0305..e6ceaa94f8 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 @@ -165,7 +165,7 @@ trait APIMethods500 { bankJson500, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InsufficientAuthorisationToCreateBank, UnknownError ), @@ -251,7 +251,7 @@ trait APIMethods500 { bankJson500, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, BankNotFound, updateBankError, UnknownError @@ -324,7 +324,7 @@ trait APIMethods500 { List( InvalidJsonFormat, BankNotFound, - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidUserId, InvalidAccountIdFormat, InvalidBankIdFormat, @@ -453,7 +453,7 @@ trait APIMethods500 { postUserAuthContextJson, userAuthContextJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, CreateUserAuthContextError, UnknownError @@ -495,7 +495,7 @@ trait APIMethods500 { EmptyBody, userAuthContextJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -533,7 +533,7 @@ trait APIMethods500 { postUserAuthContextJson, userAuthContextUpdateJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, CreateUserAuthContextError, @@ -579,7 +579,7 @@ trait APIMethods500 { postUserAuthContextUpdateJsonV310, userAuthContextUpdateJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, InvalidConnectorResponse, @@ -752,7 +752,7 @@ trait APIMethods500 { EmptyBody, consentJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagConsent, apiTagPSD2AIS, apiTagPsd2)) @@ -828,7 +828,7 @@ trait APIMethods500 { EmptyBody, consentJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, ConsentAllowedScaMethods, @@ -859,7 +859,7 @@ trait APIMethods500 { EmptyBody, consentJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, ConsentRequestIsInvalid, @@ -891,7 +891,7 @@ trait APIMethods500 { EmptyBody, consentJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, ConsentRequestIsInvalid, @@ -1354,7 +1354,7 @@ trait APIMethods500 { postCustomerJsonV500, customerJsonV310, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, CustomerNumberAlreadyExists, @@ -1430,7 +1430,7 @@ trait APIMethods500 { postCustomerOverviewJsonV500, customerOverviewJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1479,7 +1479,7 @@ trait APIMethods500 { postCustomerOverviewJsonV500, customerOverviewFlatJsonV500, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1526,7 +1526,7 @@ trait APIMethods500 { EmptyBody, customerJsonV210, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1562,7 +1562,7 @@ trait APIMethods500 { EmptyBody, customerJSONs, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserCustomerLinksNotFoundForUser, UnknownError @@ -1607,7 +1607,7 @@ trait APIMethods500 { EmptyBody, customersJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1693,7 +1693,7 @@ trait APIMethods500 { putProductJsonV500, productJsonV400.copy(attributes = None, fees = None), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -1755,7 +1755,7 @@ trait APIMethods500 { createPhysicalCardJsonV500, physicalCardJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, AllowedValuesAre, @@ -1874,7 +1874,7 @@ trait APIMethods500 { EmptyBody, viewsJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankAccountNotFound, UnknownError ), @@ -1917,7 +1917,7 @@ trait APIMethods500 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError, "user does not have owner access" @@ -2005,7 +2005,7 @@ trait APIMethods500 { EmptyBody, metricsJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2042,7 +2042,7 @@ trait APIMethods500 { EmptyBody, viewJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -2076,7 +2076,7 @@ trait APIMethods500 { EmptyBody, viewIdsJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -2123,7 +2123,7 @@ trait APIMethods500 { createSystemViewJsonV500, viewJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -2171,7 +2171,7 @@ trait APIMethods500 { viewJsonV500, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, BankAccountNotFound, UnknownError ), @@ -2214,7 +2214,7 @@ trait APIMethods500 { createCustomerAccountLinkJson, customerAccountLinkJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, BankAccountNotFound, InvalidJsonFormat, @@ -2269,7 +2269,7 @@ trait APIMethods500 { EmptyBody, customerAccountLinksJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, CustomerNotFoundByCustomerId, UserHasMissingRoles, @@ -2307,7 +2307,7 @@ trait APIMethods500 { EmptyBody, customerAccountLinksJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, BankAccountNotFound, UserHasMissingRoles, @@ -2342,7 +2342,7 @@ trait APIMethods500 { EmptyBody, customerAccountLinkJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -2376,7 +2376,7 @@ trait APIMethods500 { updateCustomerAccountLinkJson, customerAccountLinkJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -2415,7 +2415,7 @@ trait APIMethods500 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -2449,7 +2449,7 @@ trait APIMethods500 { """.stripMargin, EmptyBody, adapterInfoJsonV500, - List($UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List($AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagApi), Some(List(canGetAdapterInfo)) ) 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 aa9a1d727f..7021061a5d 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 @@ -11,7 +11,7 @@ import code.api.cache.RedisLogger import code.api.util.APIUtil._ import code.api.util.ApiRole._ import code.api.util.ApiTag._ -import code.api.util.ErrorMessages.{$UserNotLoggedIn, BankNotFound, ConsentNotFound, InvalidJsonFormat, UnknownError, UserNotFoundByUserId, UserNotLoggedIn, _} +import code.api.util.ErrorMessages.{$AuthenticatedUserIsRequired, BankNotFound, ConsentNotFound, InvalidJsonFormat, UnknownError, UserNotFoundByUserId, AuthenticatedUserIsRequired, _} import code.api.util.FutureUtil.{EndpointContext, EndpointTimeout} import code.api.util.JwtUtil.{getSignedPayloadAsJson, verifyJwt} import code.api.util.NewStyle.HttpCode @@ -270,7 +270,7 @@ trait APIMethods510 { """, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), apiTagSystem :: apiTagApi :: apiTagLogCache :: Nil, Some(List(canGetSystemLogCacheTrace, canGetSystemLogCacheAll))) @@ -301,7 +301,7 @@ trait APIMethods510 { """, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), apiTagSystem :: apiTagApi :: apiTagLogCache :: Nil, Some(List(canGetSystemLogCacheDebug, canGetSystemLogCacheAll))) @@ -332,7 +332,7 @@ trait APIMethods510 { """, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), apiTagSystem :: apiTagApi :: apiTagLogCache :: Nil, Some(List(canGetSystemLogCacheInfo, canGetSystemLogCacheAll))) @@ -363,7 +363,7 @@ trait APIMethods510 { """, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), apiTagSystem :: apiTagApi :: apiTagLogCache :: Nil, Some(List(canGetSystemLogCacheWarning, canGetSystemLogCacheAll))) @@ -394,7 +394,7 @@ trait APIMethods510 { """, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), apiTagSystem :: apiTagApi :: apiTagLogCache :: Nil, Some(List(canGetSystemLogCacheError, canGetSystemLogCacheAll))) @@ -425,7 +425,7 @@ trait APIMethods510 { """, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), apiTagSystem :: apiTagApi :: apiTagLogCache :: Nil, Some(List(canGetSystemLogCacheAll))) @@ -479,7 +479,7 @@ trait APIMethods510 { regulatedEntityPostJsonV510, regulatedEntityJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -535,7 +535,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidConnectorResponse, UnknownError @@ -638,7 +638,7 @@ trait APIMethods510 { postAgentJsonV510, agentJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, AgentNumberAlreadyExists, @@ -697,7 +697,7 @@ trait APIMethods510 { putAgentJsonV510, agentJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, AgentNotFound, @@ -746,7 +746,7 @@ trait APIMethods510 { EmptyBody, agentJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, AgentNotFound, AgentAccountLinkNotFound, @@ -788,7 +788,7 @@ trait APIMethods510 { userAttributeJsonV510, userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -840,7 +840,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidConnectorResponse, UnknownError @@ -880,7 +880,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidConnectorResponse, UnknownError @@ -924,7 +924,7 @@ trait APIMethods510 { EmptyBody, refresUserJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -965,7 +965,7 @@ trait APIMethods510 { EmptyBody, coreAccountsHeldJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserNotFoundByUserId, UnknownError @@ -1012,7 +1012,7 @@ trait APIMethods510 { EmptyBody, coreAccountsHeldJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserNotFoundByUserId, UnknownError @@ -1056,7 +1056,7 @@ trait APIMethods510 { EmptyBody, userJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UserHasMissingRoles, UnknownError), @@ -1092,7 +1092,7 @@ trait APIMethods510 { EmptyBody, CheckSystemIntegrityJsonV510(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1128,7 +1128,7 @@ trait APIMethods510 { EmptyBody, CheckSystemIntegrityJsonV510(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1165,7 +1165,7 @@ trait APIMethods510 { EmptyBody, CheckSystemIntegrityJsonV510(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1201,7 +1201,7 @@ trait APIMethods510 { EmptyBody, CheckSystemIntegrityJsonV510(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1237,7 +1237,7 @@ trait APIMethods510 { EmptyBody, currenciesJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagFx) @@ -1275,7 +1275,7 @@ trait APIMethods510 { EmptyBody, CheckSystemIntegrityJsonV510(true), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1326,7 +1326,7 @@ trait APIMethods510 { atmAttributeJsonV510, atmAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -1414,7 +1414,7 @@ trait APIMethods510 { EmptyBody, atmAttributesResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -1450,7 +1450,7 @@ trait APIMethods510 { EmptyBody, atmAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, UnknownError @@ -1489,7 +1489,7 @@ trait APIMethods510 { atmAttributeJsonV510, atmAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -1547,7 +1547,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UserHasMissingRoles, UnknownError @@ -1593,7 +1593,7 @@ trait APIMethods510 { status = "AUTHORISED" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, ConsentNotFound, @@ -1657,7 +1657,7 @@ trait APIMethods510 { status = "AUTHORISED" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, ConsentNotFound, @@ -1735,7 +1735,7 @@ trait APIMethods510 { status = "AUTHORISED" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, ConsentNotFound, @@ -1809,7 +1809,7 @@ trait APIMethods510 { EmptyBody, consentsInfoJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -1848,7 +1848,7 @@ trait APIMethods510 { EmptyBody, consentsInfoJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -1899,7 +1899,7 @@ trait APIMethods510 { EmptyBody, consentsJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -1961,7 +1961,7 @@ trait APIMethods510 { EmptyBody, consentsJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -2003,7 +2003,7 @@ trait APIMethods510 { EmptyBody, consentJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagConsent, apiTagPSD2AIS, apiTagPsd2)) @@ -2041,7 +2041,7 @@ trait APIMethods510 { EmptyBody, consentJsonV500, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagConsent, apiTagPSD2AIS, apiTagPsd2)) @@ -2085,7 +2085,7 @@ trait APIMethods510 { EmptyBody, revokedConsentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -2138,7 +2138,7 @@ trait APIMethods510 { EmptyBody, revokedConsentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -2188,7 +2188,7 @@ trait APIMethods510 { EmptyBody, revokedConsentJsonV310, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagConsent, apiTagPSD2AIS, apiTagPsd2)) @@ -2330,7 +2330,7 @@ trait APIMethods510 { postConsentImplicitJsonV310, consentJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, InvalidJsonFormat, ConsentAllowedScaMethods, @@ -2556,7 +2556,7 @@ trait APIMethods510 { EmptyBody, certificateInfoJsonV510, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, UnknownError ), @@ -2591,7 +2591,7 @@ trait APIMethods510 { postApiCollectionJson400, apiCollectionJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UserNotFoundByUserId, UnknownError @@ -2653,7 +2653,7 @@ trait APIMethods510 { """.stripMargin, EmptyBody, userJsonV400, - List($UserNotLoggedIn, UserHasMissingRoles, UserNotFoundByProviderAndUsername, UnknownError), + List($AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByProviderAndUsername, UnknownError), List(apiTagUser), Some(List(canGetAnyUser)) ) @@ -2687,7 +2687,7 @@ trait APIMethods510 { |""".stripMargin, EmptyBody, badLoginStatusJson, - List(UserNotLoggedIn, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), List(apiTagUser), Some(List(canReadUserLockedStatus)) ) @@ -2729,7 +2729,7 @@ trait APIMethods510 { |""".stripMargin, EmptyBody, badLoginStatusJson, - List(UserNotLoggedIn, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), List(apiTagUser), Some(List(canUnlockUser))) lazy val unlockUserByProviderAndUsername: OBPEndpoint = { @@ -2774,7 +2774,7 @@ trait APIMethods510 { |""".stripMargin, EmptyBody, userLockStatusJson, - List($UserNotLoggedIn, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), + List($AuthenticatedUserIsRequired, UserNotFoundByProviderAndUsername, UserHasMissingRoles, UnknownError), List(apiTagUser), Some(List(canLockUser))) lazy val lockUserByProviderAndUsername: OBPEndpoint = { @@ -2809,7 +2809,7 @@ trait APIMethods510 { EmptyBody, userLockStatusJson, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UserHasMissingRoles, UnknownError @@ -2881,7 +2881,7 @@ trait APIMethods510 { EmptyBody, aggregateMetricsJSONV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3006,7 +3006,7 @@ trait APIMethods510 { EmptyBody, metricsJsonV510, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3048,7 +3048,7 @@ trait APIMethods510 { EmptyBody, customersWithAttributesJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -3087,7 +3087,7 @@ trait APIMethods510 { postCustomerLegalNameJsonV510, customerJsonV310, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -3126,7 +3126,7 @@ trait APIMethods510 { postAtmJsonV510, atmJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -3168,7 +3168,7 @@ trait APIMethods510 { atmJsonV510.copy(id = None, attributes = None), atmJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -3282,7 +3282,7 @@ trait APIMethods510 { |${userAuthenticationMessage(!getAtmsIsPublic)}""".stripMargin, EmptyBody, atmJsonV510, - List(UserNotLoggedIn, BankNotFound, AtmNotFoundByAtmId, UnknownError), + List(AuthenticatedUserIsRequired, BankNotFound, AtmNotFoundByAtmId, UnknownError), List(apiTagATM) ) lazy val getAtm: OBPEndpoint = { @@ -3317,7 +3317,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagATM), @@ -3584,7 +3584,7 @@ trait APIMethods510 { createConsumerRequestJsonV510, consumerJsonOnlyForPostResponseV510, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -3637,7 +3637,7 @@ trait APIMethods510 { createConsumerRequestJsonV510, consumerJsonV510, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -3691,7 +3691,7 @@ trait APIMethods510 { EmptyBody, callLimitsJson510Example, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -3735,7 +3735,7 @@ trait APIMethods510 { consumerRedirectUrlJSON, consumerJSON, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3794,7 +3794,7 @@ trait APIMethods510 { consumerLogoUrlJson, consumerJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3841,7 +3841,7 @@ trait APIMethods510 { consumerCertificateJson, consumerJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3889,7 +3889,7 @@ trait APIMethods510 { consumerNameJson, consumerJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3931,7 +3931,7 @@ trait APIMethods510 { EmptyBody, consumerJSON, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, ConsumerNotFoundByConsumerId, UnknownError @@ -3970,7 +3970,7 @@ trait APIMethods510 { EmptyBody, consumersJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4052,7 +4052,7 @@ trait APIMethods510 { postAccountAccessJsonV510, viewJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4113,7 +4113,7 @@ trait APIMethods510 { postAccountAccessJsonV510, revokedJsonV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4187,7 +4187,7 @@ trait APIMethods510 { postCreateUserAccountAccessJsonV400, List(viewJsonV300), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4251,7 +4251,7 @@ trait APIMethods510 { EmptyBody, transactionRequestWithChargeJSON210, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, GetTransactionRequestsException, UnknownError ), @@ -4308,7 +4308,7 @@ trait APIMethods510 { EmptyBody, transactionRequestWithChargeJSONs210, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, BankNotFound, BankAccountNotFound, UserNoPermissionAccessView, @@ -4367,7 +4367,7 @@ trait APIMethods510 { PostTransactionRequestStatusJsonV510(TransactionRequestStatus.COMPLETED.toString), PostTransactionRequestStatusJsonV510(TransactionRequestStatus.COMPLETED.toString), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InvalidJsonFormat, @@ -4410,7 +4410,7 @@ trait APIMethods510 { EmptyBody, accountsMinimalJson400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserNotFoundByUserId, UnknownError ), @@ -4471,7 +4471,7 @@ trait APIMethods510 { |""".stripMargin, EmptyBody, moderatedCoreAccountJsonV400, - List($UserNotLoggedIn, $BankAccountNotFound,UnknownError), + List($AuthenticatedUserIsRequired, $BankAccountNotFound,UnknownError), apiTagAccount :: apiTagPSD2AIS :: apiTagPsd2 :: Nil ) lazy val getCoreAccountByIdThroughView : OBPEndpoint = { @@ -4500,7 +4500,7 @@ trait APIMethods510 { EmptyBody, accountBalanceV400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, UserNoPermissionAccessView, @@ -4539,7 +4539,7 @@ trait APIMethods510 { EmptyBody, accountBalancesV400Json, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -4570,7 +4570,7 @@ trait APIMethods510 { EmptyBody, accountBalancesV400Json, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, UnknownError ), @@ -4625,7 +4625,7 @@ trait APIMethods510 { postCounterpartyLimitV510, counterpartyLimitV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4688,7 +4688,7 @@ trait APIMethods510 { postCounterpartyLimitV510, counterpartyLimitV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4740,7 +4740,7 @@ trait APIMethods510 { EmptyBody, counterpartyLimitV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4779,7 +4779,7 @@ trait APIMethods510 { EmptyBody, counterpartyLimitStatusV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4933,7 +4933,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -4986,7 +4986,7 @@ trait APIMethods510 { createCustomViewJson, customViewJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -5044,7 +5044,7 @@ trait APIMethods510 { updateCustomViewJson, customViewJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -5120,7 +5120,7 @@ trait APIMethods510 { EmptyBody, customViewJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -5162,7 +5162,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -5322,7 +5322,7 @@ trait APIMethods510 { """.stripMargin, regulatedEntityAttributeRequestJsonV510, regulatedEntityAttributeResponseJsonV510, - List($UserNotLoggedIn, InvalidJsonFormat, UnknownError), + List($AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError), List(apiTagDirectory, apiTagApi), Some(List(canCreateRegulatedEntityAttribute)) ) @@ -5372,7 +5372,7 @@ trait APIMethods510 { """.stripMargin, EmptyBody, EmptyBody, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), List(apiTagDirectory, apiTagApi), Some(List(canDeleteRegulatedEntityAttribute)) ) @@ -5405,7 +5405,7 @@ trait APIMethods510 { """.stripMargin, EmptyBody, regulatedEntityAttributeResponseJsonV510, - List($UserNotLoggedIn,UnknownError), + List($AuthenticatedUserIsRequired,UnknownError), List(apiTagDirectory, apiTagApi), Some(List(canGetRegulatedEntityAttribute)) ) @@ -5438,7 +5438,7 @@ trait APIMethods510 { """.stripMargin, EmptyBody, regulatedEntityAttributesJsonV510, - List($UserNotLoggedIn, UnknownError), + List($AuthenticatedUserIsRequired, UnknownError), List(apiTagDirectory, apiTagApi), Some(List(canGetRegulatedEntityAttributes)) ) @@ -5471,7 +5471,7 @@ trait APIMethods510 { """.stripMargin, regulatedEntityAttributeRequestJsonV510, regulatedEntityAttributeResponseJsonV510, - List($UserNotLoggedIn, InvalidJsonFormat, UnknownError), + List($AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError), List(apiTagDirectory, apiTagApi), Some(List(canUpdateRegulatedEntityAttribute)) ) @@ -5521,7 +5521,7 @@ trait APIMethods510 { bankAccountBalanceRequestJsonV510, bankAccountBalanceResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5571,7 +5571,7 @@ trait APIMethods510 { EmptyBody, bankAccountBalanceResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5609,7 +5609,7 @@ trait APIMethods510 { EmptyBody, bankAccountBalancesJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5647,7 +5647,7 @@ trait APIMethods510 { bankAccountBalanceRequestJsonV510, bankAccountBalanceResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5701,7 +5701,7 @@ trait APIMethods510 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5803,7 +5803,7 @@ trait APIMethods510 { createViewPermissionJson, entitlementJSON, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, IncorrectRoleName, EntitlementAlreadyExists, @@ -5847,7 +5847,7 @@ trait APIMethods510 { """.stripMargin, EmptyBody, EmptyBody, - List(UserNotLoggedIn, UserHasMissingRoles, UnknownError), + List(AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError), List(apiTagSystemView), Some(List(canDeleteSystemViewPermission)) ) diff --git a/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala b/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala index 6331f2a442..9b1ca4dbae 100644 --- a/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala +++ b/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala @@ -10,7 +10,7 @@ import code.api.util.APIUtil._ import code.api.util.ApiRole import code.api.util.ApiRole._ import code.api.util.ApiTag._ -import code.api.util.ErrorMessages.{$UserNotLoggedIn, InvalidDateFormat, InvalidJsonFormat, UnknownError, DynamicEntityOperationNotAllowed, _} +import code.api.util.ErrorMessages.{$AuthenticatedUserIsRequired, InvalidDateFormat, InvalidJsonFormat, UnknownError, DynamicEntityOperationNotAllowed, _} import code.api.util.FutureUtil.EndpointContext import code.api.util.Glossary import code.api.util.NewStyle.HttpCode @@ -48,7 +48,7 @@ import code.dynamicEntity.DynamicEntityCommons import code.DynamicData.{DynamicData, DynamicDataProvider} import com.github.dwickern.macros.NameOf.nameOf import com.openbankproject.commons.ExecutionContext.Implicits.global -import com.openbankproject.commons.model.{CustomerAttribute, _} +import com.openbankproject.commons.model._ import com.openbankproject.commons.model.enums.DynamicEntityOperation._ import com.openbankproject.commons.model.enums.UserAttributeType import com.openbankproject.commons.util.{ApiVersion, ScannedApiVersion} @@ -137,7 +137,7 @@ trait APIMethods600 { transactionRequestBodyHoldJsonV600, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InsufficientAuthorisationToCreateTransactionRequest, @@ -176,7 +176,7 @@ trait APIMethods600 { EmptyBody, moderatedCoreAccountsJsonV300, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, $UserNoPermissionAccessView, @@ -248,7 +248,7 @@ trait APIMethods600 { EmptyBody, redisCallCountersJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -289,7 +289,7 @@ trait APIMethods600 { callLimitPostJsonV600, callLimitJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -359,7 +359,7 @@ trait APIMethods600 { callLimitPostJsonV400, callLimitPostJsonV400, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, InvalidJsonFormat, InvalidConsumerId, ConsumerNotFoundByConsumerId, @@ -419,7 +419,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidConsumerId, ConsumerNotFoundByConsumerId, UserHasMissingRoles, @@ -480,7 +480,7 @@ trait APIMethods600 { EmptyBody, activeRateLimitsJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidConsumerId, ConsumerNotFoundByConsumerId, UserHasMissingRoles, @@ -531,7 +531,7 @@ trait APIMethods600 { EmptyBody, activeRateLimitsJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidConsumerId, ConsumerNotFoundByConsumerId, UserHasMissingRoles, @@ -581,7 +581,7 @@ trait APIMethods600 { call_counters = redisCallCountersJsonV600 ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidConsumerCredentials, UnknownError @@ -618,7 +618,7 @@ trait APIMethods600 { ), List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -694,7 +694,7 @@ trait APIMethods600 { global_prefix = "obp_dev_" ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -771,7 +771,7 @@ trait APIMethods600 { redis_available = true ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -890,7 +890,7 @@ trait APIMethods600 { total_issues = 1 ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -986,7 +986,7 @@ trait APIMethods600 { ) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1063,7 +1063,7 @@ trait APIMethods600 { """.stripMargin, EmptyBody, userJsonV300, - List(UserNotLoggedIn, UnknownError), + List(AuthenticatedUserIsRequired, UnknownError), List(apiTagUser)) lazy val getCurrentUser: OBPEndpoint = { @@ -1128,7 +1128,7 @@ trait APIMethods600 { EmptyBody, usersInfoJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1169,7 +1169,7 @@ trait APIMethods600 { EmptyBody, userInfoJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByUserId, UnknownError @@ -1232,7 +1232,7 @@ trait APIMethods600 { EmptyBody, migrationScriptLogsJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1305,7 +1305,7 @@ trait APIMethods600 { ) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1375,7 +1375,7 @@ trait APIMethods600 { transactionRequestBodyCardanoJsonV600, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InsufficientAuthorisationToCreateTransactionRequest, @@ -1415,7 +1415,7 @@ trait APIMethods600 { transactionRequestBodyEthereumJsonV600, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InsufficientAuthorisationToCreateTransactionRequest, @@ -1454,7 +1454,7 @@ trait APIMethods600 { transactionRequestBodyEthSendRawTransactionJsonV600, transactionRequestWithChargeJSON400, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, $BankAccountNotFound, InsufficientAuthorisationToCreateTransactionRequest, @@ -1501,7 +1501,7 @@ trait APIMethods600 { bankJson600, List( InvalidJsonFormat, - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InsufficientAuthorisationToCreateBank, UnknownError ), @@ -1598,7 +1598,7 @@ trait APIMethods600 { EmptyBody, JSONFactory600.createProvidersJson(List("http://127.0.0.1:8080", "OBP", "google.com")), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1672,7 +1672,7 @@ trait APIMethods600 { EmptyBody, ConnectorMethodNamesJsonV600(List("getBank", "getBanks", "getUser", "getAccount", "makePayment", "getTransactions")), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -1839,7 +1839,7 @@ trait APIMethods600 { postCustomerJsonV600, customerJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, $BankNotFound, InvalidJsonFormat, InvalidJsonContent, @@ -1956,7 +1956,7 @@ trait APIMethods600 { EmptyBody, customerJSONsV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -1998,7 +1998,7 @@ trait APIMethods600 { PostCustomerLegalNameJsonV510(legal_name = "John Smith"), customerJSONsV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -2048,7 +2048,7 @@ trait APIMethods600 { EmptyBody, customerJSONsV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -2088,7 +2088,7 @@ trait APIMethods600 { EmptyBody, customerWithAttributesJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserCustomerLinksNotFoundForUser, UnknownError @@ -2130,7 +2130,7 @@ trait APIMethods600 { postCustomerNumberJsonV310, customerWithAttributesJsonV600, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserCustomerLinksNotFoundForUser, UnknownError ), @@ -2261,7 +2261,7 @@ trait APIMethods600 { EmptyBody, metricsJsonV510, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2395,7 +2395,7 @@ trait APIMethods600 { EmptyBody, aggregateMetricsJSONV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2636,7 +2636,7 @@ trait APIMethods600 { is_enabled = true ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -2713,7 +2713,7 @@ trait APIMethods600 { is_enabled = true ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2784,7 +2784,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -2873,7 +2873,7 @@ trait APIMethods600 { is_enabled = true ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -3081,7 +3081,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, EntitlementCannotBeDeleted, UnknownError @@ -3148,7 +3148,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3200,7 +3200,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3278,7 +3278,7 @@ trait APIMethods600 { entitlements_skipped = List("CanCreateTransaction") ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -3391,7 +3391,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3488,7 +3488,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3559,7 +3559,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3643,7 +3643,7 @@ trait APIMethods600 { ) )), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3704,7 +3704,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, SystemViewNotFound, UnknownError @@ -3766,7 +3766,7 @@ trait APIMethods600 { // ) // ), // List( -// UserNotLoggedIn, +// AuthenticatedUserIsRequired, // UserHasMissingRoles, // SystemViewNotFound, // UnknownError @@ -3839,7 +3839,7 @@ trait APIMethods600 { ), List( InvalidJsonFormat, - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, SystemViewNotFound, SystemViewCannotBePublicError, @@ -3897,7 +3897,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -3980,7 +3980,7 @@ trait APIMethods600 { createViewJsonV300, viewJsonV300, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, InvalidCustomViewFormat, @@ -4031,7 +4031,7 @@ trait APIMethods600 { EmptyBody, ViewsJsonV500(List()), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4089,7 +4089,7 @@ trait APIMethods600 { "https://api.example.com/user_mgt/reset_password/QOL1CPNJPCZ4BRMPX3Z01DPOX1HMGU3L" ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4421,7 +4421,7 @@ trait APIMethods600 { WebUiPropsPutJsonV600("https://apiexplorer.openbankproject.com"), WebUiPropsCommons("webui_api_explorer_url", "https://apiexplorer.openbankproject.com", Some("some-web-ui-props-id")), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, InvalidWebUiProps, @@ -4491,7 +4491,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidWebUiProps, UnknownError @@ -4563,7 +4563,7 @@ trait APIMethods600 { List(dynamicEntityResponseBodyExample) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4639,7 +4639,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4764,7 +4764,7 @@ trait APIMethods600 { updated_by_user_id = "user123" ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -4841,7 +4841,7 @@ trait APIMethods600 { updated_by_user_id = "user123" ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4899,7 +4899,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -4968,7 +4968,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5026,7 +5026,7 @@ trait APIMethods600 { updated_by_user_id = "user456" ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5092,7 +5092,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5193,7 +5193,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5446,7 +5446,7 @@ trait APIMethods600 { ) ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, UnknownError ), @@ -5513,7 +5513,7 @@ trait APIMethods600 { message = "ABAC rule code is valid" ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5610,7 +5610,7 @@ trait APIMethods600 { result = true ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5710,7 +5710,7 @@ trait APIMethods600 { result = true ), List( - UserNotLoggedIn, + AuthenticatedUserIsRequired, UserHasMissingRoles, InvalidJsonFormat, UnknownError @@ -5808,7 +5808,7 @@ trait APIMethods600 { ), userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByUserId, InvalidJsonFormat, @@ -5866,7 +5866,7 @@ trait APIMethods600 { user_attributes = List(userAttributeResponseJsonV510) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByUserId, UnknownError @@ -5903,7 +5903,7 @@ trait APIMethods600 { EmptyBody, userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByUserId, UserAttributeNotFound, @@ -5950,7 +5950,7 @@ trait APIMethods600 { ), userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByUserId, UserAttributeNotFound, @@ -6011,7 +6011,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserHasMissingRoles, UserNotFoundByUserId, UserAttributeNotFound, @@ -6075,7 +6075,7 @@ trait APIMethods600 { ), userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, InvalidJsonFormat, UnknownError ), @@ -6129,7 +6129,7 @@ trait APIMethods600 { user_attributes = List(userAttributeResponseJsonV510) ), List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UnknownError ), List(apiTagUser, apiTagUserAttribute, apiTagAttribute), @@ -6162,7 +6162,7 @@ trait APIMethods600 { EmptyBody, userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserAttributeNotFound, UnknownError ), @@ -6205,7 +6205,7 @@ trait APIMethods600 { ), userAttributeResponseJsonV510, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserAttributeNotFound, InvalidJsonFormat, UnknownError @@ -6262,7 +6262,7 @@ trait APIMethods600 { EmptyBody, EmptyBody, List( - $UserNotLoggedIn, + $AuthenticatedUserIsRequired, UserAttributeNotFound, UnknownError ), diff --git a/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala b/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala index e92c6bdf59..988ec21681 100644 --- a/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala +++ b/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala @@ -442,7 +442,7 @@ object LocalMappedConnector extends Connector with MdcLoggable { hashOfSuppliedAnswer: String, callContext: Option[CallContext] ): OBPReturnType[Box[ChallengeTrait]] = Future { - val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here.")) + val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$AuthenticatedUserIsRequired Can not find the userId here.")) (Challenges.ChallengeProvider.vend.validateChallenge(challengeId, hashOfSuppliedAnswer, userId), callContext) } override def validateChallengeAnswerC3( @@ -453,7 +453,7 @@ object LocalMappedConnector extends Connector with MdcLoggable { hashOfSuppliedAnswer: String, callContext: Option[CallContext] ) : OBPReturnType[Box[ChallengeTrait]] = Future { - val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here.")) + val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$AuthenticatedUserIsRequired Can not find the userId here.")) (Challenges.ChallengeProvider.vend.validateChallenge(challengeId, hashOfSuppliedAnswer, userId), callContext) } @@ -466,7 +466,7 @@ object LocalMappedConnector extends Connector with MdcLoggable { suppliedAnswerType: SuppliedAnswerType.Value, callContext: Option[CallContext] ): OBPReturnType[Box[ChallengeTrait]] = Future { - val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here.")) + val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$AuthenticatedUserIsRequired Can not find the userId here.")) (Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId), callContext) } @@ -479,7 +479,7 @@ object LocalMappedConnector extends Connector with MdcLoggable { suppliedAnswerType: SuppliedAnswerType.Value, callContext: Option[CallContext] ): OBPReturnType[Box[ChallengeTrait]] = Future { - val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here.")) + val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$AuthenticatedUserIsRequired Can not find the userId here.")) (Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId), callContext) } @@ -497,14 +497,14 @@ object LocalMappedConnector extends Connector with MdcLoggable { override def validateChallengeAnswerV2(challengeId: String, suppliedAnswer: String, suppliedAnswerType:SuppliedAnswerType, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = Future { - val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here.")) + val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$AuthenticatedUserIsRequired Can not find the userId here.")) //In OBP, we only validateChallenge with SuppliedAnswerType.PLAN_TEXT, (Full(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, suppliedAnswer, userId).isDefined), callContext) } override def validateChallengeAnswer(challengeId: String, hashOfSuppliedAnswer: String, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = Future { - val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$UserNotLoggedIn Can not find the userId here.")) + val userId = callContext.map(_.user.map(_.userId).openOrThrowException(s"$AuthenticatedUserIsRequired Can not find the userId here.")) (Full(Challenges.ChallengeProvider.vend.validateChallenge(challengeId, hashOfSuppliedAnswer, userId).isDefined), callContext) } diff --git a/obp-api/src/main/scala/code/model/ModeratedBankingData.scala b/obp-api/src/main/scala/code/model/ModeratedBankingData.scala index d1623e060d..cbe1eeb622 100644 --- a/obp-api/src/main/scala/code/model/ModeratedBankingData.scala +++ b/obp-api/src/main/scala/code/model/ModeratedBankingData.scala @@ -123,7 +123,7 @@ class ModeratedTransactionMetadata( */ def deleteTag(tagId : String, user: Option[User], bankAccount : BankAccount, view: View, callContext: Option[CallContext]) : Box[Unit] = { for { - u <- Box(user) ?~ { UserNotLoggedIn} + u <- Box(user) ?~ { AuthenticatedUserIsRequired} tagList <- Box(tags) ?~ { s"$NoViewPermission can_delete_tag. " } tag <- Box(tagList.find(tag => tag.id_ == tagId)) ?~ {"Tag with id " + tagId + "not found for this transaction"} deleteFunc <- if(tag.postedBy == user||view.allowed_actions.exists(_ == CAN_DELETE_TAG)) @@ -140,7 +140,7 @@ class ModeratedTransactionMetadata( */ def deleteImage(imageId : String, user: Option[User], bankAccount : BankAccount, view: View, callContext: Option[CallContext]) : Box[Unit] = { for { - u <- Box(user) ?~ { UserNotLoggedIn} + u <- Box(user) ?~ { AuthenticatedUserIsRequired} imageList <- Box(images) ?~ { s"$NoViewPermission can_delete_image." } image <- Box(imageList.find(image => image.id_ == imageId)) ?~ {"Image with id " + imageId + "not found for this transaction"} deleteFunc <- if(image.postedBy == user || view.allowed_actions.exists(_ ==CAN_DELETE_IMAGE)) @@ -154,7 +154,7 @@ class ModeratedTransactionMetadata( def deleteComment(commentId: String, user: Option[User],bankAccount: BankAccount, view: View, callContext: Option[CallContext]) : Box[Unit] = { for { - u <- Box(user) ?~ { UserNotLoggedIn} + u <- Box(user) ?~ { AuthenticatedUserIsRequired} commentList <- Box(comments) ?~ { s"$NoViewPermission can_delete_comment." } comment <- Box(commentList.find(comment => comment.id_ == commentId)) ?~ {"Comment with id "+commentId+" not found for this transaction"} deleteFunc <- if(comment.postedBy == user || view.allowed_actions.exists(_ ==CAN_DELETE_COMMENT)) @@ -168,7 +168,7 @@ class ModeratedTransactionMetadata( def deleteWhereTag(viewId: ViewId, user: Option[User],bankAccount: BankAccount, view: View, callContext: Option[CallContext]) : Box[Boolean] = { for { - u <- Box(user) ?~ { UserNotLoggedIn} + u <- Box(user) ?~ { AuthenticatedUserIsRequired} whereTagOption <- Box(whereTag) ?~ { s"$NoViewPermission can_delete_where_tag. Current ViewId($viewId)" } whereTag <- Box(whereTagOption) ?~ {"there is no tag to delete"} deleteFunc <- if(whereTag.postedBy == user || view.allowed_actions.exists(_ ==CAN_DELETE_WHERE_TAG)) diff --git a/obp-api/src/main/scala/code/snippet/BerlinGroupConsent.scala b/obp-api/src/main/scala/code/snippet/BerlinGroupConsent.scala index 132dc0a9b5..b01334e65a 100644 --- a/obp-api/src/main/scala/code/snippet/BerlinGroupConsent.scala +++ b/obp-api/src/main/scala/code/snippet/BerlinGroupConsent.scala @@ -160,7 +160,7 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510 // Get all accounts held by the current user val userAccounts: Set[BankIdAccountId] = - AccountHolders.accountHolders.vend.getAccountsHeldByUser(AuthUser.currentUser.flatMap(_.user.foreign).openOrThrowException(ErrorMessages.UserNotLoggedIn), Some(null)).toSet + AccountHolders.accountHolders.vend.getAccountsHeldByUser(AuthUser.currentUser.flatMap(_.user.foreign).openOrThrowException(ErrorMessages.AuthenticatedUserIsRequired), Some(null)).toSet val userIbans: Set[String] = userAccounts.flatMap { acc => BankAccountRouting.find( By(BankAccountRouting.BankId, acc.bankId.value), @@ -429,7 +429,7 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510 } private def updateConsentUser(consent: MappedConsent): Box[MappedConsent] = { - val loggedInUser = AuthUser.currentUser.flatMap(_.user.foreign).openOrThrowException(ErrorMessages.UserNotLoggedIn) + val loggedInUser = AuthUser.currentUser.flatMap(_.user.foreign).openOrThrowException(ErrorMessages.AuthenticatedUserIsRequired) Consents.consentProvider.vend.updateConsentUser(consent.consentId, loggedInUser) val jwt = Consent.updateUserIdOfBerlinGroupConsentJWT(loggedInUser.userId, consent, None).openOrThrowException(ErrorMessages.InvalidConnectorResponse) Consents.consentProvider.vend.setJsonWebToken(consent.consentId, jwt) diff --git a/obp-api/src/main/scala/code/snippet/WebUI.scala b/obp-api/src/main/scala/code/snippet/WebUI.scala index 5b0704a021..7973f6ceda 100644 --- a/obp-api/src/main/scala/code/snippet/WebUI.scala +++ b/obp-api/src/main/scala/code/snippet/WebUI.scala @@ -406,7 +406,7 @@ class WebUI extends MdcLoggable{ val htmlDescription = if (APIUtil.glossaryDocsRequireRole){ val userId = AuthUser.getCurrentResourceUserUserId if (userId == ""){ - s"