Store Bearer token in Config.
diff --git a/apigee_sync.go b/apigee_sync.go index ba9f876..44845e6 100644 --- a/apigee_sync.go +++ b/apigee_sync.go
@@ -266,6 +266,12 @@ return false } token = oauthResp.AccessToken + + /* + * This stores the bearer token for any other plugin to + * consume. + */ + config.Set(bearerToken, token) log.Debug("Got a new Bearer token.") return true }
diff --git a/init.go b/init.go index 7eda269..e78b399 100644 --- a/init.go +++ b/init.go
@@ -20,7 +20,10 @@ ApigeeSyncEventSelector = "ApigeeSync" // special value - set by ApigeeSync, not taken from configuration - configApidInstanceID = "apigeesync_apid_instance_id" + configApidInstanceID = "apigeesync_apid_instance_id" + // This will not be needed once we have plugin + // handling tokens. + bearerToken = "apigeesync_bearer_token" ) var (