diff --git a/src/main/java/eu/h2020/symbiote/client/SymbioteComponentClientFactory.java b/src/main/java/eu/h2020/symbiote/client/SymbioteComponentClientFactory.java index 5bb242d..bb9cb14 100644 --- a/src/main/java/eu/h2020/symbiote/client/SymbioteComponentClientFactory.java +++ b/src/main/java/eu/h2020/symbiote/client/SymbioteComponentClientFactory.java @@ -129,8 +129,10 @@ public static T createClient(String baseUrl, Class clientClass, String ta public static T createClient(String baseUrl, Class clientClass, SecurityConfiguration securityConfiguration) throws SecurityHandlerException { - return createClient(baseUrl, clientClass, securityConfiguration.getClientId(), - securityConfiguration.getPlatformId(), createSecurityHandler(securityConfiguration)); + String clientId = (securityConfiguration != null) ? securityConfiguration.getClientId() : null; + String platformId = (securityConfiguration != null) ? securityConfiguration.getPlatformId() : null; + + return createClient(baseUrl, clientClass, clientId, platformId, createSecurityHandler(securityConfiguration)); } public static IComponentSecurityHandler createSecurityHandler(SecurityConfiguration securityConfiguration)