SDK AutoConfig & improvements & fixes (#1663)
* SDK autoconfiguration added * Option for custom error decoder and request interceptor added * Fixed authentication for targets with security token Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -93,8 +93,10 @@ public class SetupHelper {
|
||||
securityTargetToken = randomToken();
|
||||
mgmtTargetRestApi.updateTarget(controllerId,
|
||||
new MgmtTargetRequestBody().setSecurityToken(securityTargetToken));
|
||||
} else {
|
||||
securityTargetToken = target.getSecurityToken();
|
||||
}
|
||||
} else if (!securityTargetToken.equals(target.getSecurityToken())){
|
||||
} else if (!securityTargetToken.equals(target.getSecurityToken())) {
|
||||
// update target's with the security token (since it doesn't match)
|
||||
mgmtTargetRestApi.updateTarget(controllerId,
|
||||
new MgmtTargetRequestBody().setSecurityToken(securityTargetToken));
|
||||
|
||||
@@ -40,7 +40,6 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootApplication
|
||||
@Import({ HawkbitSDKConfigurtion.class})
|
||||
public class DeviceApp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -41,7 +41,6 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootApplication
|
||||
@Import({ HawkbitSDKConfigurtion.class})
|
||||
public class MultiDeviceApp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#
|
||||
|
||||
spring.main.web-application-type=none
|
||||
spring.cloud.openfeign.httpclient.hc5.enabled=true
|
||||
|
||||
logging.level.org.eclipse.hawkbit=DEBUG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user