Changed credentials value for device mqtt basic auth
This commit is contained in:
parent
6a6bd6117b
commit
a2afde6261
@ -418,9 +418,14 @@ public class JsonConverter {
|
|||||||
if (toGateway) {
|
if (toGateway) {
|
||||||
result.addProperty("id", requestId);
|
result.addProperty("id", requestId);
|
||||||
}
|
}
|
||||||
|
switch (payload.getCredentialsType()) {
|
||||||
|
case ACCESS_TOKEN:
|
||||||
|
case X509_CERTIFICATE:
|
||||||
|
result.addProperty("credentialsValue", payload.getCredentialsValue());
|
||||||
|
case MQTT_BASIC:
|
||||||
|
result.add("credentialsValue", JSON_PARSER.parse(payload.getCredentialsValue()).getAsJsonObject());
|
||||||
|
}
|
||||||
result.addProperty("credentialsType", payload.getCredentialsType().name());
|
result.addProperty("credentialsType", payload.getCredentialsType().name());
|
||||||
result.addProperty("credentialsValue",
|
|
||||||
StringUtils.isEmpty(payload.getCredentialsValue()) ? null : payload.getCredentialsValue());
|
|
||||||
result.addProperty("status", ProvisionResponseStatus.SUCCESS.name());
|
result.addProperty("status", ProvisionResponseStatus.SUCCESS.name());
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user