Skip to content

Trusted Entitlements: added link to docs in ErrorCode.signatureVerificationFailed#2783

Merged
NachoSoto merged 1 commit into
mainfrom
verification-failure-error-link
Jul 11, 2023
Merged

Trusted Entitlements: added link to docs in ErrorCode.signatureVerificationFailed#2783
NachoSoto merged 1 commit into
mainfrom
verification-failure-error-link

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

@NachoSoto NachoSoto requested a review from a team July 11, 2023 15:56
@codecov

codecov Bot commented Jul 11, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2783 (d45cc5f) into main (1f83693) will decrease coverage by 0.22%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2783      +/-   ##
==========================================
- Coverage   86.49%   86.27%   -0.22%     
==========================================
  Files         214      214              
  Lines       15379    15379              
==========================================
- Hits        13302    13269      -33     
- Misses       2077     2110      +33     
Impacted Files Coverage Δ
Sources/Error Handling/ErrorCode.swift 94.89% <100.00%> (ø)

... and 6 files with indirect coverage changes

@NachoSoto NachoSoto merged commit 2727d7e into main Jul 11, 2023
@NachoSoto NachoSoto deleted the verification-failure-error-link branch July 11, 2023 16:48
This was referenced Jul 11, 2023
NachoSoto added a commit that referenced this pull request Jul 11, 2023
**This is an automatic release.**

### New Features
* `Trusted Entitlements`: (#2621) via NachoSoto (@NachoSoto)

This new feature prevents MitM attacks between the SDK and the
RevenueCat server.
With verification enabled, the SDK ensures that the response created by
the server was not modified by a third-party, and the entitlements
received are exactly what was sent.
This is 100% opt-in. `EntitlementInfos` have a new `VerificationResult`
property, which will indicate the validity of the responses when this
feature is enabled.

```swift
let purchases = Purchases.configure(
  with: Configuration
    .builder(withAPIKey: "")
    .with(entitlementVerificationMode: .informational)
)
let customerInfo = try await purchases.customerInfo()
if !customerInfo.entitlements.verification.isVerified {
  print("Entitlements could not be verified")
}
```

You can learn more from [the
documentation](https://www.revenuecat.com/docs/trusted-entitlements).

### Other Changes
* `TrustedEntitlements`: new `VerificationResult.isVerified` (#2788) via
NachoSoto (@NachoSoto)
* `Refactor`: extracted `Collection.subscript(safe:)` (#2779) via
NachoSoto (@NachoSoto)
* `Trusted Entitlements`: added link to docs in
`ErrorCode.signatureVerificationFailed` (#2783) via NachoSoto
(@NachoSoto)
* `Trusted Entitlements`: improved documentation (#2782) via NachoSoto
(@NachoSoto)
* `Tests`: fixed flaky failure with asynchronous check (#2777) via
NachoSoto (@NachoSoto)
* `Integration Tests`: re-enable signature verification tests (#2744)
via NachoSoto (@NachoSoto)
* `CI`: remove `Jazzy` (#2775) via NachoSoto (@NachoSoto)
* `Signing`: inject `ClockType` to ensure hardcoded signatures don't
fail when intermediate key expires (#2771) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants