Stay organized with collections
Save and categorize content based on your preferences.
Google.Play.Integrity.IntegrityManager
Manages requests for integrity information.
Summary
Public functions
IntegrityManager
IntegrityManager()
RequestIntegrityToken
PlayAsyncOperation< IntegrityTokenResponse, IntegrityErrorCode > RequestIntegrityToken(
IntegrityTokenRequest integrityTokenRequest
)
Starts a PlayAsyncOperation to generate a token for integrity-related enquiries, and provides the token as it's result.
The JSON payload is signed and encrypted as a nested JSON Web Token (JWT), that is JWE of JWS.
JWE uses A256KW as a key wrapping algorithm and A256GCM as a content encryption algorithm. JWS uses ES256 as a signing algorithm.
All decryption and verification should be done within a secure server environment. Do not decrypt or verify the received token from within the client app. In particular, never expose any decryption keys to the client app.
See https://developer.android.com/google/play/integrity/verdict#token-format.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-05-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-02 UTC."],[],[],null,["# Google.Play.Integrity.IntegrityManager Class Reference\n\nGoogle.Play.Integrity.IntegrityManager\n======================================\n\nManages requests for integrity information.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [IntegrityManager](#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManager_1aef6c7500ed0bb4ad5e7f6e9d835a39fe)`()` Constructor. ||\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [RequestIntegrityToken](#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManager_1a1dcfd0e7f77001135c708d6420d0b98e)`(`[IntegrityTokenRequest](/reference/unity/class/Google/Play/Integrity/IntegrityTokenRequest#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenRequest)` integrityTokenRequest)` | `PlayAsyncOperation\u003c `[IntegrityTokenResponse](/reference/unity/class/Google/Play/Integrity/IntegrityTokenResponse#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenResponse)`, `[IntegrityErrorCode](/reference/unity/namespace/Google/Play/Integrity#namespaceGoogle_1_1Play_1_1Integrity_1a7df9f11cac69ea066240452ce7300b63)` \u003e` Starts a PlayAsyncOperation to generate a token for integrity-related enquiries, and provides the token as it's result. |\n\nPublic functions\n----------------\n\n### IntegrityManager\n\n```c#\n IntegrityManager()\n``` \nConstructor. \n\n### RequestIntegrityToken\n\n```c#\nPlayAsyncOperation\u003c IntegrityTokenResponse, IntegrityErrorCode \u003e RequestIntegrityToken(\n IntegrityTokenRequest integrityTokenRequest\n)\n``` \nStarts a PlayAsyncOperation to generate a token for integrity-related enquiries, and provides the token as it's result.\n\nThe JSON payload is signed and encrypted as a nested JSON Web Token (JWT), that is [JWE](https://tools.ietf.org/html/rfc7516) of [JWS](https://tools.ietf.org/html/rfc7515).\n\nJWE uses [A256KW](https://tools.ietf.org/html/rfc7518#section-4.4) as a key wrapping algorithm and [A256GCM](https://tools.ietf.org/html/rfc7518#section-5.3) as a content encryption algorithm. JWS uses [ES256](https://tools.ietf.org/html/rfc7518#section-3.4) as a signing algorithm.\n\nAll decryption and verification should be done within a secure server environment. Do not decrypt or verify the received token from within the client app. In particular, never expose any decryption keys to the client app.\n\nSee \u003chttps://developer.android.com/google/play/integrity/verdict#token-format\u003e.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Returns** | A PlayAsyncOperation{IntegrityTokenResponse, IntegrityErrorCode} that returns [IntegrityTokenResponse](/reference/unity/class/Google/Play/Integrity/IntegrityTokenResponse#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenResponse) on successful callback or [IntegrityErrorCode](/reference/unity/namespace/Google/Play/Integrity#namespaceGoogle_1_1Play_1_1Integrity_1a7df9f11cac69ea066240452ce7300b63) on failure callback. |"]]