feature/added confirm-vrp-consent pages - tweaked

This commit is contained in:
hongwei 2025-01-23 23:46:49 +08:00
parent e1d2d92edd
commit ac99b387fa

View File

@ -193,8 +193,8 @@ class VrpConsentCreation extends MdcLoggable with RestHelper with APIMethods510
tryo {json.parse(response).extract[ConsumerJsonV310]} match {
case Full(consumerJsonV310) =>
//4th: get the redirect url.
val redirectURL = consumerJsonV310.redirect_url
S.redirectTo(redirectURL)
val redirectURL = consumerJsonV310.redirect_url.trim
S.redirectTo(s"$redirectURL?CONSENT_REQUEST_ID=${consentJsonV510.consent_request_id.getOrElse("")}")
case _ =>
S.error(s"$InvalidJsonFormat The Json body should be the $ConsumerJsonV310. " +
s"Please check `Get Consumer` !")