Trusted entitlements: Do not use etags if cache version not requested and verification enabled#1114
Merged
tonidero merged 9 commits intoJul 3, 2023
Conversation
Codecov Report
@@ Coverage Diff @@
## toniricodiez/sdk-3200-verify-intermediate-signature-android-3 #1114 +/- ##
=================================================================================================
- Coverage 85.12% 85.11% -0.01%
=================================================================================================
Files 186 186
Lines 6568 6572 +4
Branches 932 934 +2
=================================================================================================
+ Hits 5591 5594 +3
Misses 603 603
- Partials 374 375 +1
|
NachoSoto
approved these changes
Jun 30, 2023
NachoSoto
left a comment
Contributor
There was a problem hiding this comment.
👏🏻
Yeah useful to add this logic here too as you said
| return when (storedResult.httpResult.verificationResult) { | ||
| VerificationResult.VERIFIED -> true | ||
| VerificationResult.NOT_REQUESTED -> !verificationRequested | ||
| // Should never happen since we don't store these verification results in the cache |
Contributor
There was a problem hiding this comment.
I’ll add this comment too 👍🏻
| resultFromBackend.verificationResult != VerificationResult.FAILED | ||
| } | ||
|
|
||
| private fun shouldUseETag(storedResult: HTTPResultWithETag, verificationRequested: Boolean): Boolean { |
Base automatically changed from
toniricodiez/sdk-3200-verify-intermediate-signature-android-3
to
new-trusted-entitlements-signature-format
July 3, 2023 10:55
tonidero
added a commit
that referenced
this pull request
Jul 7, 2023
… and verification enabled (#1114) ### Description Added additional checks to not use cached etags when cached result is NOT_REQUESTED and verification is enabled. This will be used for other signed requests aside from the customer info/post receipt/login endpoints.
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.
Description
Added additional checks to not use cached etags when cached result is NOT_REQUESTED and verification is enabled. This will be used for other signed requests aside from the customer info/post receipt/login endpoints.