Skip to content

Commit

Permalink
docfix/Put debug logging at ConsentUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
constantine2nd committed Jul 10, 2024
1 parent 74be5ba commit 9005c05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions obp-api/src/main/scala/code/api/util/ConsentUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ object Consent extends MdcLoggable {
JwtUtil.getSignedPayloadAsJson(consentIdAsJwt) match {
case Full(jsonAsString) =>
try {
logger.debug(s"Start of net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]")
val consent = net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]
logger.debug(s"End of net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]: $consent")
checkConsent(consent, consentIdAsJwt, calContext) match { // Check is it Consent-JWT expired
case (Full(true)) => // OK
applyConsentRules(consent)
Expand Down Expand Up @@ -371,7 +373,9 @@ object Consent extends MdcLoggable {
JwtUtil.getSignedPayloadAsJson(consentAsJwt) match {
case Full(jsonAsString) =>
try {
logger.debug(s"Start of net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]")
val consent = net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]
logger.debug(s"End of net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]: $consent")
// Set Consumer into Call Context
val consumer = getCurrentConsumerViaMtls(callContext)
val updatedCallContext = callContext.copy(consumer = consumer)
Expand Down Expand Up @@ -490,7 +494,9 @@ object Consent extends MdcLoggable {
JwtUtil.getSignedPayloadAsJson(storedConsent.jsonWebToken) match {
case Full(jsonAsString) =>
try {
logger.debug(s"Start of net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]")
val consent = net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]
logger.debug(s"End of net.liftweb.json.parse(jsonAsString).extract[ConsentJWT]: $consent")
checkConsent(consent, storedConsent.jsonWebToken, updatedCallContext) match { // Check is it Consent-JWT expired
case (Full(true)) => // OK
// Update MappedConsent.usesSoFarTodayCounter field
Expand Down

0 comments on commit 9005c05

Please sign in to comment.