File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
control/src/main/kotlin/spp/probe Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,11 @@ object ProbeConfiguration {
97
97
val spp: JsonObject
98
98
get() = localProperties!! .getJsonObject(" spp" )
99
99
100
- fun getString (property : String? ): String? {
100
+ fun getJsonObject (property : String ): JsonObject ? {
101
+ return localProperties!! .getJsonObject(" spp" ).getJsonObject(property)
102
+ }
103
+
104
+ fun getString (property : String ): String? {
101
105
return localProperties!! .getJsonObject(" spp" ).getString(property)
102
106
}
103
107
Original file line number Diff line number Diff line change @@ -265,10 +265,14 @@ object SourceProbe {
265
265
meta.putAll(ProbeConfiguration .spp.getJsonObject(" probe_metadata" ).map)
266
266
}
267
267
268
+ // add probe auth headers
269
+ ProbeConfiguration .getJsonObject(" authentication" )?.let {
270
+ it.getString(" client_id" )?.let { probeMessageHeaders.put(" client_id" , it) }
271
+ it.getString(" client_secret" )?.let { probeMessageHeaders.put(" client_secret" , it) }
272
+ it.getString(" tenant_id" )?.let { probeMessageHeaders.put(" tenant_id" , it) }
273
+ }
274
+
268
275
// send probe connected status
269
- meta[" client_id" ]?.let { probeMessageHeaders.put(" client_id" , it) }
270
- meta[" client_secret" ]?.let { probeMessageHeaders.put(" client_secret" , it) }
271
- meta[" tenant_id" ]?.let { probeMessageHeaders.put(" tenant_id" , it) }
272
276
val replyAddress = UUID .randomUUID().toString()
273
277
val pc = InstanceConnection (PROBE_ID , System .currentTimeMillis(), meta)
274
278
val consumer = vertx!! .eventBus().localConsumer<Boolean >(replyAddress)
You can’t perform that action at this time.
0 commit comments