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 {
9797 val spp: JsonObject
9898 get() = localProperties!! .getJsonObject(" spp" )
9999
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? {
101105 return localProperties!! .getJsonObject(" spp" ).getString(property)
102106 }
103107
Original file line number Diff line number Diff line change @@ -265,10 +265,14 @@ object SourceProbe {
265265 meta.putAll(ProbeConfiguration .spp.getJsonObject(" probe_metadata" ).map)
266266 }
267267
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+
268275 // 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) }
272276 val replyAddress = UUID .randomUUID().toString()
273277 val pc = InstanceConnection (PROBE_ID , System .currentTimeMillis(), meta)
274278 val consumer = vertx!! .eventBus().localConsumer<Boolean >(replyAddress)
You can’t perform that action at this time.
0 commit comments