Skip to content

Commit

Permalink
feature: 提供文件源管理、凭据管理相关ESB API TencentBlueKing#92
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonwan authored and hLinx committed Sep 16, 2021
1 parent 8a9ab22 commit ff53958
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ public class EsbCreateOrUpdateCredentialV3Req extends EsbReq {
/**
* Username
*/
private String username;
@JsonProperty("username")
private String credentialUsername;

/**
* Password
*/
private String password;
@JsonProperty("password")
private String credentialPassword;
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private EsbResp<EsbCredentialSimpleInfoV3DTO> saveCredential(EsbCreateOrUpdateCr
CredentialCreateUpdateReq createUpdateReq = convertToCreateUpdateReq(req);
InnerServiceResponse<ServiceBasicCredentialDTO> resp =
credentialService.createCredential(
req.getUsername(),
req.getUserName(),
req.getAppId(),
createUpdateReq
);
Expand Down Expand Up @@ -104,13 +104,13 @@ private CredentialCreateUpdateReq convertToCreateUpdateReq(
if (SECRET_KEY.name().equals(type)) {
createUpdateReq.setValue1(req.getSecretKey());
} else if (PASSWORD.name().equals(type)) {
createUpdateReq.setValue1(req.getPassword());
createUpdateReq.setValue1(req.getCredentialPassword());
} else if (APP_ID_SECRET_KEY.name().equals(type)) {
createUpdateReq.setValue1(req.getAccessKey());
createUpdateReq.setValue2(req.getSecretKey());
} else if (USERNAME_PASSWORD.name().equals(type)) {
createUpdateReq.setValue1(req.getUsername());
createUpdateReq.setValue2(req.getPassword());
createUpdateReq.setValue1(req.getCredentialUsername());
createUpdateReq.setValue2(req.getCredentialPassword());
} else {
throw new InvalidParamException(
"type",
Expand Down

0 comments on commit ff53958

Please sign in to comment.