Skip to content

Commit

Permalink
Merge pull request e-mission#55 from shankari/only_support_token_auth
Browse files Browse the repository at this point in the history
👽 Use getOPCode instead of getToken
  • Loading branch information
shankari authored Jul 12, 2023
2 parents f3de905 + 6de52fc commit 01c4e4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-serversync"
version="1.3.1">
version="1.3.2">

<name>ServerSync</name>
<description>Push and pull local data to the server</description>
Expand Down
4 changes: 2 additions & 2 deletions src/android/ServerSyncAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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();


/*
Expand Down

0 comments on commit 01c4e4c

Please sign in to comment.