Repository navigation
Conversation
A consent's OBP_CONSENT_CHALLENGE rows are deleted when the PSU answers one correctly on POST .../consents/CONSENT_ID/authorise (the answered challenge and any other one started on the consent), and when the consent becomes REVOKED, REJECTED or EXPIRED through updateConsentStatus, revoke or the UK expiry sweep. A wrong answer keeps its row so the attempt counter still applies. Berlin Group consent challenges and transaction request challenges are left as they are, since they are read after answering.
|
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A consent's
OBP_CONSENT_CHALLENGErows inExpectedChallengeAnswerare now deleted once none of them can be used any more. When the PSU answers a UK consent challenge correctly onPOST /obp/v5.1.0/banks/BANK_ID/consents/CONSENT_ID/authorise, the answered challenge and any other challenge started on that consent are removed. The same happens when the consent becomesREVOKED,REJECTEDorEXPIRED, whether throughupdateConsentStatus(including the management endpointPUT /management/banks/BANK_ID/consents/CONSENT_ID), throughrevoke(every revoke endpoint, the UK DELETE included) or through the UK expiry sweep inConsentScheduler. A wrong answer keeps its row, so the attempt counter still limits the next guesses. Rows of other challenge types are never touched: Berlin Group consent challenges stay because the BG authorisation endpoints list them after they are answered, and transaction request challenges stay because the quorum check counts them. The removal goes through a newChallengeProvider.deleteChallengesByConsentId(consentId, challengeType). A failed delete is logged and does not fail the request, because the answer or status change has already gone through.UKOpenBankingV401AccountInfoTestscovers a correct answer (both OBP consent challenges removed, a Berlin Group challenge on the same consent kept), a wrong answer (row and attempt count kept), a correct answer that is then refused (challenge still removed), the REJECTED / REVOKED / EXPIRED transitions next to AUTHORISED (which keeps its rows), and the UK expiry sweep.