mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 18:46:46 +00:00
bugfix/Fix Berlin Group SCA page issue
This commit is contained in:
parent
835ce8c299
commit
cef6c6627b
@ -401,9 +401,7 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510
|
||||
Consents.consentProvider.vend.getConsentByConsentId(consentId) match {
|
||||
case Full(consent) if otpValue.is == consent.challenge =>
|
||||
updateConsentUser(consent)
|
||||
updateConsentJwt(consent) map { i =>
|
||||
Consents.consentProvider.vend.updateConsentStatus(consentId, ConsentStatus.rejected)
|
||||
}
|
||||
Consents.consentProvider.vend.updateConsentStatus(consentId, ConsentStatus.rejected)
|
||||
S.redirectTo(
|
||||
s"$redirectUriValue?CONSENT_ID=${consentId}"
|
||||
)
|
||||
@ -421,9 +419,7 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510
|
||||
Consents.consentProvider.vend.getConsentByConsentId(consentId) match {
|
||||
case Full(consent) if otpValue.is == consent.challenge =>
|
||||
updateConsentUser(consent)
|
||||
updateConsentJwt(consent) map { i =>
|
||||
Consents.consentProvider.vend.updateConsentStatus(consentId, ConsentStatus.valid)
|
||||
}
|
||||
Consents.consentProvider.vend.updateConsentStatus(consentId, ConsentStatus.valid)
|
||||
S.redirectTo(
|
||||
s"/confirm-bg-consent-request-redirect-uri?CONSENT_ID=${consentId}"
|
||||
)
|
||||
@ -438,10 +434,6 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510
|
||||
val jwt = Consent.updateUserIdOfBerlinGroupConsentJWT(loggedInUser.userId, consent, None).openOrThrowException(ErrorMessages.InvalidConnectorResponse)
|
||||
Consents.consentProvider.vend.setJsonWebToken(consent.consentId, jwt)
|
||||
}
|
||||
private def updateConsentJwt(consent: MappedConsent) = {
|
||||
val loggedInUser = AuthUser.currentUser.flatMap(_.user.foreign).openOrThrowException(ErrorMessages.UserNotLoggedIn)
|
||||
Consent.updateViewsOfBerlinGroupConsentJWT(loggedInUser, consent, None)
|
||||
}
|
||||
|
||||
private def getTppRedirectUri() = {
|
||||
val consentId = ObpS.param("CONSENT_ID") openOr ("")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user