Skip to content

Commit

Permalink
Detect if ClientId includes PlatformId as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Antonio Sanchez committed Mar 13, 2018
1 parent be442a1 commit 271c5bb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@ public static <T> T createClient(String baseUrl, Class<T> clientClass, SecurityC
.encoder(new JacksonEncoder());

if (securityConfiguration != null) {
String finalClientId = securityConfiguration.getClientId();
if (!finalClientId.contains("@")) {
finalClientId = securityConfiguration.getClientId() + "@" + securityConfiguration.getPlatformId();
}
IComponentSecurityHandler secHandler = ComponentSecurityHandlerFactory
.getComponentSecurityHandler(securityConfiguration.getKeystorePath(),
securityConfiguration.getKeystorePassword(),
securityConfiguration.getClientId()+"@"+securityConfiguration.getPlatformId(),
finalClientId,
securityConfiguration.getLocalAAMAddress(),
securityConfiguration.getComponentOwnerUsername(),
securityConfiguration.getComponentOwnerPassword()
Expand Down

0 comments on commit 271c5bb

Please sign in to comment.