From 6de52fccf2049b05b0fb9b1dc5820e87d91d04e1 Mon Sep 17 00:00:00 2001 From: Shankari Date: Tue, 11 Jul 2023 22:58:21 -0700 Subject: [PATCH] :alien: Use getOPCode instead of getToken To be consistent with https://github.com/e-mission/cordova-jwt-auth/pull/48 This is also part of the workaround for https://github.com/e-mission/e-mission-docs/issues/930 --- plugin.xml | 2 +- src/android/ServerSyncAdapter.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.xml b/plugin.xml index 170c430..a411df7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + version="1.3.2"> ServerSync Push and pull local data to the server diff --git a/src/android/ServerSyncAdapter.java b/src/android/ServerSyncAdapter.java index 28a8879..8412ec8 100644 --- a/src/android/ServerSyncAdapter.java +++ b/src/android/ServerSyncAdapter.java @@ -105,7 +105,7 @@ public void onPerformSync(Account account, Bundle extras, String authority, AuthTokenCreator ac = AuthTokenCreationFactory.getInstance(cachedContext); // Get the list of uncategorized trips from the server // hardcoding the URL and the userID for now since we are still using fake data - String userName = ac.getOPCode().await().getEmail(); + String userName = ac.getOPCode().await().getOPCode(); System.out.println("real user name = "+userName); if (userName == null || userName.trim().length() == 0) { @@ -114,7 +114,7 @@ public void onPerformSync(Account account, Bundle extras, String authority, return; } // First, get a token so that we can make the authorized calls to the server - String userToken = ac.getServerToken().await().getToken(); + String userToken = ac.getOPCode().await().getOPCode(); /*