Skip to content

Commit

Permalink
feat: Update name clientId
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzo-ingenito committed Dec 11, 2024
1 parent 59daed2 commit fe50df6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Map<String, Object> consumerConfigs() {
if("OAUTHBEARER".equals(kafkaPropsCfg.getMechanism())) {
props.put("sasl.login.callback.handler.class", CustomAuthenticateCallbackHandler.class);
props.put("kafka.oauth.tenantId", kafkaPropsCfg.getTenantId());
props.put("kafka.oauth.clientId", kafkaPropsCfg.getClientId());
props.put("kafka.oauth.appId", kafkaPropsCfg.getAppId());
props.put("kafka.oauth.pwd", kafkaPropsCfg.getPwd());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ public Map<String, Object> producerWithoutTransactionConfigs() {
if("OAUTHBEARER".equals(kafkaPropCFG.getMechanism())) {
props.put("sasl.login.callback.handler.class", CustomAuthenticateCallbackHandler.class);
props.put("kafka.oauth.tenantId", kafkaPropCFG.getTenantId());
props.put("kafka.oauth.clientId", kafkaPropCFG.getClientId());
props.put("kafka.oauth.appId", kafkaPropCFG.getAppId());
props.put("kafka.oauth.pwd", kafkaPropCFG.getPwd());
}


return props;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class KafkaPropertiesCFG {
@Value("${kafka.oauth.tenantId}")
private String tenantId;

@Value("${kafka.oauth.clientId}")
private String clientId;
@Value("${kafka.oauth.appId}")
private String appId;

@Value("${kafka.oauth.pwd}")
private String pwd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void configure(Map<String, ?> configs, String mechanism, List<AppConfigur
ClientCredentialParameters.builder(Collections.singleton(sbUri + "/.default"))
.build();
this.tenantId = "https://login.microsoftonline.com/"+ Arrays.asList(configs.get("kafka.oauth.tenantId")).get(0).toString();
this.clientId = Arrays.asList(configs.get("kafka.oauth.clientId")).get(0).toString();
this.clientId = Arrays.asList(configs.get("kafka.oauth.appId")).get(0).toString();
this.pwd = Arrays.asList(configs.get("kafka.oauth.pwd")).get(0).toString();

}
Expand Down

0 comments on commit fe50df6

Please sign in to comment.