Build fix
This commit is contained in:
parent
920ebc792a
commit
b0e7bc0e31
@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.thingsboard.server.common.data.Device;
|
||||
import org.thingsboard.server.common.data.id.DeviceId;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
@ -142,8 +143,13 @@ public class LocalTransportApiService implements TransportApiService {
|
||||
return getEmptyTransportApiResponse();
|
||||
}
|
||||
try {
|
||||
ValidateDeviceCredentialsResponseMsg.Builder builder = ValidateDeviceCredentialsResponseMsg.newBuilder();
|
||||
builder.setDeviceInfo(getDeviceInfoProto(device));
|
||||
if(!StringUtils.isEmpty(credentials.getCredentialsValue())){
|
||||
builder.setCredentialsBody(credentials.getCredentialsValue());
|
||||
}
|
||||
return TransportApiResponseMsg.newBuilder()
|
||||
.setValidateTokenResponseMsg(ValidateDeviceCredentialsResponseMsg.newBuilder().setDeviceInfo(getDeviceInfoProto(device)).setCredentialsBody(credentials.getCredentialsValue()).build()).build();
|
||||
.setValidateTokenResponseMsg(builder.build()).build();
|
||||
} catch (JsonProcessingException e) {
|
||||
log.warn("[{}] Failed to lookup device by id", deviceId, e);
|
||||
return getEmptyTransportApiResponse();
|
||||
|
||||
@ -40,7 +40,7 @@ public abstract class AbstractTransportService implements TransportService {
|
||||
private boolean rateLimitEnabled;
|
||||
@Value("${transport.rate_limits.tenant}")
|
||||
private String perTenantLimitsConf;
|
||||
@Value("${transport.rate_limits.tenant}")
|
||||
@Value("${transport.rate_limits.device}")
|
||||
private String perDevicesLimitsConf;
|
||||
@Value("${transport.sessions.inactivity_timeout}")
|
||||
private long sessionInactivityTimeout;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user