Skip to content

Commit

Permalink
refactor/tweaked the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwei1 committed Jun 13, 2023
1 parent 855b50f commit 0cc0085
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/api/util/ErrorMessages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ object ErrorMessages {
val GetCustomerAccountLinksError = "OBP-30226: Could not get the customer account links."
val UpdateCustomerAccountLinkError = "OBP-30227: Could not update the customer account link."
val DeleteCustomerAccountLinkError = "OBP-30228: Could not delete the customer account link."
val GetConsentImplicitSCAError = "OBP-30229: Could not get the consent implicit SCA."
val GetConsentImplicitSCAError = "OBP-30229: Could not get the implicit SCA consent."

val CreateSystemViewError = "OBP-30250: Could not create the system view"
val DeleteSystemViewError = "OBP-30251: Could not delete the system view"
Expand Down Expand Up @@ -515,7 +515,7 @@ object ErrorMessages {
val ConsumerKeyIsToLong = "OBP-35031: The Consumer Key max length <= 512"
val ConsentHeaderValueInvalid = "OBP-35032: The Consent's Request Header value is not formatted as UUID or JWT."
val RolesForbiddenInConsent = s"OBP-35033: Consents cannot contain the following Roles: ${canCreateEntitlementAtOneBank} and ${canCreateEntitlementAtAnyBank}."
val UserAuthContextUpdateRequestAllowedScaMethods = "OBP-35034: Only SMS and EMAIL are supported as SCA methods. "
val UserAuthContextUpdateRequestAllowedScaMethods = "OBP-35034: Unsupported as SCA method. "

//Authorisations
val AuthorisationNotFound = "OBP-36001: Authorisation not found. Please specify valid values for PAYMENT_ID and AUTHORISATION_ID. "
Expand Down
6 changes: 3 additions & 3 deletions obp-api/src/main/scala/code/api/v3_1_0/APIMethods310.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3549,7 +3549,7 @@ trait APIMethods310 {
callContext
)
} yield Future{status}
case v if v == StrongCustomerAuthentication.SMS.toString => // Not implemented
case v if v == StrongCustomerAuthentication.SMS.toString =>
for {
failMsg <- Future {
s"$InvalidJsonFormat The Json body should be the $PostConsentPhoneJsonV310"
Expand All @@ -3566,7 +3566,7 @@ trait APIMethods310 {
callContext
)
} yield Future{status}
case v if v == StrongCustomerAuthentication.IMPLICIT.toString => // Not implemented
case v if v == StrongCustomerAuthentication.IMPLICIT.toString =>
for {
(consentImplicitSCA, callContext) <- NewStyle.function.getConsentImplicitSCA(user, callContext)
status <- consentImplicitSCA.scaMethod match {
Expand All @@ -3578,7 +3578,7 @@ trait APIMethods310 {
challengeText,
callContext
)
case v if v == StrongCustomerAuthentication.SMS => // Not implemented
case v if v == StrongCustomerAuthentication.SMS =>
Connector.connector.vend.sendCustomerNotification(
StrongCustomerAuthentication.SMS,
consentImplicitSCA.recipient,
Expand Down
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala
Original file line number Diff line number Diff line change
Expand Up @@ -984,15 +984,15 @@ trait APIMethods500 {
_ <- scaMethod match {
case v if v == StrongCustomerAuthentication.EMAIL.toString => // Send the email
sendEmailNotification(callContext, consentRequestJson, challengeText)
case v if v == StrongCustomerAuthentication.SMS.toString => // Not implemented
case v if v == StrongCustomerAuthentication.SMS.toString =>
sendSmsNotification(callContext, consentRequestJson, challengeText)
case v if v == StrongCustomerAuthentication.IMPLICIT.toString =>
for {
(consentImplicitSCA, callContext) <- NewStyle.function.getConsentImplicitSCA(user, callContext)
status <- consentImplicitSCA.scaMethod match {
case v if v == StrongCustomerAuthentication.EMAIL => // Send the email
sendEmailNotification(callContext, consentRequestJson.copy(email=Some(consentImplicitSCA.recipient)), challengeText)
case v if v == StrongCustomerAuthentication.SMS => // Not implemented
case v if v == StrongCustomerAuthentication.SMS =>
sendSmsNotification(callContext, consentRequestJson.copy(phone_number=Some(consentImplicitSCA.recipient)), challengeText)
case _ => Future {
"Success"
Expand Down

0 comments on commit 0cc0085

Please sign in to comment.