Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
IntegrityManager
public
interface
IntegrityManager
com.google.android.play.core.integrity.IntegrityManager
|
Gère les demandes d'informations sur l'intégrité.
Résumé
Méthodes publiques
requestIntegrityToken
public abstract Task<IntegrityTokenResponse> requestIntegrityToken (IntegrityTokenRequest request)
Génère et renvoie un jeton pour les demandes liées à l'intégrité.
La charge utile JSON est signée et chiffrée en tant que JWT imbriqué, c'est-à-dire un JWE de JWS.
JWE utilise A256KW comme algorithme d'encapsulation de clé et A256GCM comme algorithme de chiffrement de contenu. JWS utilise ES256 en tant qu'algorithme de signature.
Chaque déchiffrement et chaque vérification doivent être effectués dans un environnement de serveur sécurisé. Vous ne devez pas déchiffrer ni vérifier le jeton reçu depuis l'application cliente. Plus précisément, n'exposez jamais des clés de déchiffrement à l'application cliente.
Consultez la page https://developer.android.com/google/play/integrity/verdict#token-format.
Paramètres |
request |
IntegrityTokenRequest : objet utilisé pour demander un jeton d'intégrité. |
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/29 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/29 (UTC)."],[],[],null,["IntegrityManager\n\n\n`\npublic\n\n\ninterface\nIntegrityManager\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------------|\n| com.google.android.play.core.integrity.IntegrityManager |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nManages requests for integrity information.\n\nSummary\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`\u003c`[IntegrityTokenResponse](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenResponse.html)`\u003e` | ` `[requestIntegrityToken](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityManager.html#requestIntegrityToken(com.google.android.play.core.integrity.IntegrityTokenRequest))`(`[IntegrityTokenRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.html)` request) ` Generates and returns a token for integrity-related enquiries. |\n| ` abstract `[Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`\u003c`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`\u003e` | ` `[showDialog](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityManager.html#showDialog(com.google.android.play.core.integrity.IntegrityDialogRequest))`(`[IntegrityDialogRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityDialogRequest.html)` request) ` Displays a dialog to the user. |\n\nPublic methods \n\nrequestIntegrityToken \n\n```\npublic abstract Task\u003cIntegrityTokenResponse\u003e requestIntegrityToken (IntegrityTokenRequest request)\n```\n\nGenerates and returns a token for integrity-related enquiries.\n\nThe JSON payload is signed and encrypted as a nested 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\nwrapping algorithm and [A256GCM](https://tools.ietf.org/html/rfc7518#section-5.3) as\na 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\ndecrypt or verify the received token from within the client app. In particular, never expose\nany decryption keys to the client app.\n\nSee https://developer.android.com/google/play/integrity/verdict#token-format.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|-----------------------------------------------------------------------------|\n| `request` | `IntegrityTokenRequest`: the object to request integrity token with. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`\u003c`[IntegrityTokenResponse](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenResponse.html)`\u003e` | A [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html) that completes once the requestIntegrityToken flow succeeded or failed. \u003cbr /\u003e |\n\nshowDialog \n\n```\npublic abstract Task\u003cInteger\u003e showDialog (IntegrityDialogRequest request)\n```\n\nDisplays a dialog to the user.\n\nThis method can only be called once per [IntegrityDialogRequest.IntegrityResponse](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityDialogRequest.IntegrityResponse.html).\n\n| Parameters ||\n|-----------|-----------------------------------------------------------------------------------------|\n| `request` | `IntegrityDialogRequest`: contains the configuration for the dialog to be shown. \u003cbr /\u003e |\n\n| Returns ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`\u003c`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`\u003e` | A [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html) that completes with a [IntegrityDialogResponseCode](https://developer.android.com/android/reference/com/google/android/play/core/integrity/model/IntegrityDialogResponseCode) once the showDialog flow succeeded or failed. \u003cbr /\u003e |"]]