laptop and a wrench

Bogue

The RouteTask.setCredential method is not applying the credential to service requests.

Dernière publication: September 20, 2019 ArcGIS Runtime SDK
Numéro d’ID de bogue BUG-000124688
EnvoiAugust 21, 2019
Dernière modificationJune 11, 2022
S’applique àArcGIS Runtime SDK
Version trouvée100.5
Système d’exploitationApple iOS
Version du système d’exploitationN/A
StatutIn Product Plan

Solution de contournement

Use one of the following workarounds:

  • Set a UserCredential that is constructed from username and password like the following on the RouteTask.

UserCredential credential = new UserCredential(“your username”, “your password”);

  • Use the AuthenticationManager.CredentialCache.restoreFromJson method to apply token for the service https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/security/AuthenticationManager.CredentialCache.html#restoreFromJson(java.lang.String).

e.g.

AuthenticationManager.CredentialCache.restoreFromJson("[{\"serverContext\":\"route.arcgis.com/arcgis\",\"credential\":\"{\\\"password\\\":\\\"\\\",\\\"token\\\":{\\\"expires\\\":9223372036854775807,\\\"ssl\\\":true,\\\"token\\\":\\\" <token> \\\"},\\\"username\\\":\\\"\\\"}\"}]");

Étapes pour reproduire

ID de bogue: BUG-000124688

Logiciel:

  • ArcGIS Runtime SDK

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement