mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 13:07:02 +00:00
refactor/Tweak Berlin Group constants
This commit is contained in:
parent
2048f72aa2
commit
bbb41e45ec
@ -1090,7 +1090,7 @@ using the extended forms as indicated above.
|
||||
}
|
||||
(challenges, callContext) <- NewStyle.function.createChallengesC2(
|
||||
List(u.userId),
|
||||
ChallengeType.BERLINGROUP_CONSENT_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_CONSENT_CHALLENGE,
|
||||
None,
|
||||
getSuggestedDefaultScaMethod(),
|
||||
Some(StrongCustomerAuthenticationStatus.received),
|
||||
@ -1260,7 +1260,7 @@ Maybe in a later version the access path will change.
|
||||
challenges.filter(_.challengeId == authorisationId).size == 1
|
||||
}
|
||||
(challenge, callContext) <- NewStyle.function.validateChallengeAnswerC2(
|
||||
ChallengeType.BERLINGROUP_CONSENT_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_CONSENT_CHALLENGE,
|
||||
None,
|
||||
Some(consentId),
|
||||
challenges.filter(_.challengeId == authorisationId).head.challengeId,
|
||||
|
||||
@ -21,7 +21,7 @@ import code.views.Views
|
||||
import com.github.dwickern.macros.NameOf.nameOf
|
||||
import com.openbankproject.commons.ExecutionContext.Implicits.global
|
||||
import com.openbankproject.commons.model._
|
||||
import com.openbankproject.commons.model.enums.ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE
|
||||
import com.openbankproject.commons.model.enums.ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE
|
||||
import com.openbankproject.commons.model.enums.TransactionRequestStatus._
|
||||
import com.openbankproject.commons.model.enums.{ChallengeType, StrongCustomerAuthenticationStatus, TransactionRequestStatus}
|
||||
import com.openbankproject.commons.util.ApiVersion
|
||||
@ -600,7 +600,7 @@ Check the transaction status of a payment initiation.""",
|
||||
),
|
||||
transDetailsSerialized,
|
||||
"",
|
||||
Some(BERLINGROUP_PAYMENT_CHALLENGE),
|
||||
Some(BERLIN_GROUP_PAYMENT_CHALLENGE),
|
||||
None,
|
||||
None,
|
||||
Some(transDetailsJson),
|
||||
@ -926,7 +926,7 @@ This applies in the following scenarios:
|
||||
|
||||
(challenges, callContext) <- NewStyle.function.createChallengesC2(
|
||||
List(u.userId),
|
||||
ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE,
|
||||
Some(paymentId),
|
||||
getScaMethodAtInstance(SEPA_CREDIT_TRANSFERS.toString).toOption,
|
||||
Some(StrongCustomerAuthenticationStatus.received),
|
||||
@ -1021,7 +1021,7 @@ This applies in the following scenarios:
|
||||
}
|
||||
(challenges, callContext) <- NewStyle.function.createChallengesC2(
|
||||
List(u.userId),
|
||||
ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE,
|
||||
Some(paymentId),
|
||||
getScaMethodAtInstance(SEPA_CREDIT_TRANSFERS.toString).toOption,
|
||||
Some(StrongCustomerAuthenticationStatus.received),
|
||||
@ -1227,7 +1227,7 @@ There are the following request types on this access path:
|
||||
}
|
||||
(_, callContext) <- NewStyle.function.getTransactionRequestImpl(TransactionRequestId(paymentId), callContext)
|
||||
(challenge, callContext) <- NewStyle.function.validateChallengeAnswerC2(
|
||||
ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE,
|
||||
Some(paymentId),
|
||||
None,
|
||||
authorisationId,
|
||||
@ -1470,7 +1470,7 @@ There are the following request types on this access path:
|
||||
existingTransactionRequest.status == TransactionRequestStatus.INITIATED.toString
|
||||
}
|
||||
(challenge, callContext) <- NewStyle.function.validateChallengeAnswerC2(
|
||||
ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE,
|
||||
Some(paymentId),
|
||||
None,
|
||||
authorisationid,
|
||||
|
||||
@ -383,7 +383,7 @@ This applies in the following scenarios:
|
||||
_ <- passesPsd2Pisp(callContext)
|
||||
(challenges, callContext) <- NewStyle.function.createChallengesC3(
|
||||
List(u.userId),
|
||||
ChallengeType.BERLINGROUP_SIGNING_BASKETS_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_SIGNING_BASKETS_CHALLENGE,
|
||||
None,
|
||||
getSuggestedDefaultScaMethod(),
|
||||
Some(StrongCustomerAuthenticationStatus.received),
|
||||
@ -477,7 +477,7 @@ There are the following request types on this access path:
|
||||
_ <- SigningBasketNewStyle.checkSigningBasketPayments(basketId, callContext)
|
||||
// Validate a challenge answer and get an error if any
|
||||
(boxedChallenge: Box[ChallengeTrait], callContext) <- NewStyle.function.validateChallengeAnswerC3(
|
||||
ChallengeType.BERLINGROUP_SIGNING_BASKETS_CHALLENGE,
|
||||
ChallengeType.BERLIN_GROUP_SIGNING_BASKETS_CHALLENGE,
|
||||
None,
|
||||
None,
|
||||
Some(basketId),
|
||||
|
||||
@ -1340,9 +1340,9 @@ object NewStyle extends MdcLoggable{
|
||||
hashOfSuppliedAnswer: String,
|
||||
callContext: Option[CallContext]
|
||||
): OBPReturnType[ChallengeTrait] = {
|
||||
if(challengeType == ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE && transactionRequestId.isEmpty ){
|
||||
if(challengeType == ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE && transactionRequestId.isEmpty ){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_PAYMENT_CHALLENGE challengeType: paymentId($transactionRequestId) ")}
|
||||
}else if(challengeType == ChallengeType.BERLINGROUP_CONSENT_CHALLENGE && consentId.isEmpty ){
|
||||
}else if(challengeType == ChallengeType.BERLIN_GROUP_CONSENT_CHALLENGE && consentId.isEmpty ){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_CONSENT_CHALLENGE challengeType: consentId($consentId) ")}
|
||||
}else{
|
||||
Connector.connector.vend.validateChallengeAnswerC2(
|
||||
@ -1369,11 +1369,11 @@ object NewStyle extends MdcLoggable{
|
||||
hashOfSuppliedAnswer: String,
|
||||
callContext: Option[CallContext]
|
||||
): OBPReturnType[Box[ChallengeTrait]] = {
|
||||
if(challengeType == ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE && transactionRequestId.isEmpty ){
|
||||
if(challengeType == ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE && transactionRequestId.isEmpty ){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_PAYMENT_CHALLENGE challengeType: paymentId($transactionRequestId) ")}
|
||||
} else if(challengeType == ChallengeType.BERLINGROUP_CONSENT_CHALLENGE && consentId.isEmpty ){
|
||||
} else if(challengeType == ChallengeType.BERLIN_GROUP_CONSENT_CHALLENGE && consentId.isEmpty ){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_CONSENT_CHALLENGE challengeType: consentId($consentId) ")}
|
||||
} else if(challengeType == ChallengeType.BERLINGROUP_SIGNING_BASKETS_CHALLENGE && basketId.isEmpty ){
|
||||
} else if(challengeType == ChallengeType.BERLIN_GROUP_SIGNING_BASKETS_CHALLENGE && basketId.isEmpty ){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_CONSENT_CHALLENGE challengeType: basketId($basketId) ")}
|
||||
} else {
|
||||
Connector.connector.vend.validateChallengeAnswerC3(
|
||||
@ -1409,9 +1409,9 @@ object NewStyle extends MdcLoggable{
|
||||
authenticationMethodId: Option[String],
|
||||
callContext: Option[CallContext]
|
||||
) : OBPReturnType[List[ChallengeTrait]] = {
|
||||
if(challengeType == ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE && (transactionRequestId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
if(challengeType == ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE && (transactionRequestId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_PAYMENT challengeType: paymentId($transactionRequestId), scaStatus($scaStatus), scaMethod($scaMethod) ")}
|
||||
}else if(challengeType == ChallengeType.BERLINGROUP_CONSENT_CHALLENGE && (consentId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
}else if(challengeType == ChallengeType.BERLIN_GROUP_CONSENT_CHALLENGE && (consentId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_CONSENT challengeType: consentId($consentId), scaStatus($scaStatus), scaMethod($scaMethod) ")}
|
||||
}else{
|
||||
Connector.connector.vend.createChallengesC2(
|
||||
@ -1453,11 +1453,11 @@ object NewStyle extends MdcLoggable{
|
||||
authenticationMethodId: Option[String],
|
||||
callContext: Option[CallContext]
|
||||
) : OBPReturnType[List[ChallengeTrait]] = {
|
||||
if(challengeType == ChallengeType.BERLINGROUP_PAYMENT_CHALLENGE && (transactionRequestId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
if(challengeType == ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE && (transactionRequestId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_PAYMENT challengeType: paymentId($transactionRequestId), scaStatus($scaStatus), scaMethod($scaMethod) ")}
|
||||
} else if(challengeType == ChallengeType.BERLINGROUP_CONSENT_CHALLENGE && (consentId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
} else if(challengeType == ChallengeType.BERLIN_GROUP_CONSENT_CHALLENGE && (consentId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_CONSENT challengeType: consentId($consentId), scaStatus($scaStatus), scaMethod($scaMethod) ")}
|
||||
} else if(challengeType == ChallengeType.BERLINGROUP_SIGNING_BASKETS_CHALLENGE && (basketId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
} else if(challengeType == ChallengeType.BERLIN_GROUP_SIGNING_BASKETS_CHALLENGE && (basketId.isEmpty || scaStatus.isEmpty || scaMethod.isEmpty)){
|
||||
Future{ throw new Exception(s"$UnknownError The following parameters can not be empty for BERLINGROUP_CONSENT challengeType: basketId($basketId), scaStatus($scaStatus), scaMethod($scaMethod) ")}
|
||||
} else {
|
||||
Connector.connector.vend.createChallengesC3(
|
||||
|
||||
@ -125,9 +125,9 @@ sealed trait ChallengeType extends EnumValue
|
||||
object ChallengeType extends OBPEnumeration[ChallengeType] {
|
||||
object OBP_TRANSACTION_REQUEST_CHALLENGE extends Value
|
||||
object OBP_CONSENT_CHALLENGE extends Value
|
||||
object BERLINGROUP_PAYMENT_CHALLENGE extends Value
|
||||
object BERLINGROUP_CONSENT_CHALLENGE extends Value
|
||||
object BERLINGROUP_SIGNING_BASKETS_CHALLENGE extends Value
|
||||
object BERLIN_GROUP_PAYMENT_CHALLENGE extends Value
|
||||
object BERLIN_GROUP_CONSENT_CHALLENGE extends Value
|
||||
object BERLIN_GROUP_SIGNING_BASKETS_CHALLENGE extends Value
|
||||
}
|
||||
|
||||
sealed trait PemCertificateRole extends EnumValue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user