appstoreserverlibrary.signed_data_verifier module¶
- class appstoreserverlibrary.signed_data_verifier.SignedDataVerifier(root_certificates: List[bytes], enable_online_checks: bool, environment: Environment, bundle_id: str, app_apple_id: int | None = None)[source]¶
Bases:
object
A class providing utility methods for verifying and decoding App Store signed data.
- verify_and_decode_app_transaction(signed_app_transaction: str) AppTransaction [source]¶
Verifies and decodes a signed AppTransaction See https://developer.apple.com/documentation/storekit/apptransaction
- Parameters:
signed_app_transaction – The signed AppTransaction
- Returns:
The decoded AppTransaction after validation
- Throws VerificationException:
Thrown if the data could not be verified
- verify_and_decode_notification(signed_payload: str) ResponseBodyV2DecodedPayload [source]¶
Verifies and decodes an App Store Server Notification signedPayload See https://developer.apple.com/documentation/appstoreservernotifications/signedpayload
- Parameters:
signedPayload – The payload received by your server
- Returns:
The decoded payload after verification
- Throws VerificationException:
Thrown if the data could not be verified
- verify_and_decode_renewal_info(signed_renewal_info: str) JWSRenewalInfoDecodedPayload [source]¶
Verifies and decodes a signedRenewalInfo obtained from the App Store Server API, an App Store Server Notification, or from a device See https://developer.apple.com/documentation/appstoreserverapi/jwsrenewalinfo
- Parameters:
signed_renewal_info – The signedRenewalInfo field
- Returns:
The decoded renewal info after verification
- Throws VerificationException:
Thrown if the data could not be verified
- verify_and_decode_signed_transaction(signed_transaction: str) JWSTransactionDecodedPayload [source]¶
Verifies and decodes a signedTransaction obtained from the App Store Server API, an App Store Server Notification, or from a device See https://developer.apple.com/documentation/appstoreserverapi/jwstransaction
- Parameters:
signed_transaction – The signedTransaction field
- Returns:
The decoded transaction info after verification
- Throws VerificationException:
Thrown if the data could not be verified
- exception appstoreserverlibrary.signed_data_verifier.VerificationException(status: VerificationStatus)[source]¶
Bases:
Exception