From b4d58da65a99f35745582ef97bd664e9632ebd73 Mon Sep 17 00:00:00 2001
From: Alx Dark <alx.dark@sagebase.org>
Date: Mon, 4 Apr 2022 14:10:44 -0700
Subject: [PATCH] Switch to access token.

---
 .../sagebionetworks/bridge/exporter/config/SpringConfig.java    | 2 +-
 src/main/resources/BridgeExporter.conf                          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/sagebionetworks/bridge/exporter/config/SpringConfig.java b/src/main/java/org/sagebionetworks/bridge/exporter/config/SpringConfig.java
index 16c9de5..39fc084 100644
--- a/src/main/java/org/sagebionetworks/bridge/exporter/config/SpringConfig.java
+++ b/src/main/java/org/sagebionetworks/bridge/exporter/config/SpringConfig.java
@@ -200,7 +200,7 @@ public SynapseClient synapseClient() {
 
         SynapseClient synapseClient = new SynapseAdminClientImpl();
         synapseClient.setUsername(config.get("synapse.user"));
-        synapseClient.setApiKey(config.get("synapse.api.key"));
+        synapseClient.setBearerAuthorizationToken(config.get("synapse.access.token"));
         return synapseClient;
     }
 
diff --git a/src/main/resources/BridgeExporter.conf b/src/main/resources/BridgeExporter.conf
index 2aeaea5..9c7cf03 100644
--- a/src/main/resources/BridgeExporter.conf
+++ b/src/main/resources/BridgeExporter.conf
@@ -7,6 +7,7 @@ bridge.worker.password=your-worker-account-here
 
 synapse.user=your-username-here
 synapse.api.key=your-api-key-here
+synapse.access.token=your-access-token-here
 synapse.principal.id=your-principal-id-here
 
 exporter.request.sqs.sleep.time.millis=125