Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions obp-api/src/main/scala/code/api/util/APIUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3020,13 +3020,15 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{

// Identify consumer via certificate
val consumerByCertificate = Consent.getCurrentConsumerViaTppSignatureCertOrMtls(callContext = cc)
logger.debug(s"consumerByCertificate: $consumerByCertificate")
val method = APIUtil.getPropsValue(nameOfProperty = "consumer_validation_method_for_consent", defaultValue = "CONSUMER_CERTIFICATE")
val consumerByConsumerKey = getConsumerKey(reqHeaders) match {
case Some(consumerKey) if method == "CONSUMER_KEY_VALUE" =>
Consumers.consumers.vend.getConsumerByConsumerKey(consumerKey)
case None =>
Empty
}
logger.debug(s"consumerByConsumerKey: $consumerByConsumerKey")

val res =
if (authHeadersWithEmptyValues.nonEmpty) { // Check Authorization Headers Empty Values
Expand Down
1 change: 1 addition & 0 deletions obp-api/src/main/scala/code/api/util/ConsentUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ object Consent extends MdcLoggable {

private def tppIsConsentHolder(consumerIdFromConsent: String, callContext: CallContext): Boolean = {
val consumerIdFromCurrentCall = callContext.consumer.map(_.consumerId.get).orNull
logger.debug(s"consumerIdFromConsent == consumerIdFromCurrentCall ($consumerIdFromConsent == $consumerIdFromCurrentCall)")
consumerIdFromConsent == consumerIdFromCurrentCall
}

Expand Down