Skip to content

Commit

Permalink
add nacos authentication parameters (apache#1342)
Browse files Browse the repository at this point in the history
Co-authored-by: xiong.zegang <[email protected]>
Co-authored-by: xiaoyu <[email protected]>
  • Loading branch information
3 people authored Apr 27, 2021
1 parent 93cd931 commit c9f53f9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ public void init(final SoulServerRegisterPublisher publisher, final SoulRegister
Properties nacosProperties = new Properties();
nacosProperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);
nacosProperties.put(PropertyKeyConst.NAMESPACE, properties.getProperty("nacosNameSpace"));
// the nacos authentication username
nacosProperties.put(PropertyKeyConst.USERNAME, properties.getProperty(PropertyKeyConst.USERNAME, ""));
// the nacos authentication password
nacosProperties.put(PropertyKeyConst.PASSWORD, properties.getProperty(PropertyKeyConst.PASSWORD, ""));
// access key for namespace
nacosProperties.put(PropertyKeyConst.ACCESS_KEY, properties.getProperty(PropertyKeyConst.ACCESS_KEY, ""));
// secret key for namespace
nacosProperties.put(PropertyKeyConst.SECRET_KEY, properties.getProperty(PropertyKeyConst.SECRET_KEY, ""));
this.configService = ConfigFactory.createConfigService(nacosProperties);
this.namingService = NamingFactory.createNamingService(nacosProperties);
subscribe();
Expand Down

0 comments on commit c9f53f9

Please sign in to comment.