Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo authored Nov 2, 2023
1 parent 3de678f commit d188714
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/io/kestra/plugin/aws/ecr/GetAuthToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ public TokenOutput run(RunContext runContext) throws Exception {
String encodedToken = authorizationData.get(0).authorizationToken();
byte[] decodedTokenBytes = Base64.getDecoder().decode(encodedToken);

return TokenOutput.builder().token(new String(decodedTokenBytes)).build();
String token = new String(decodedTokenBytes);
if (token.indexOf(":") > 0) {
token = token.substring(token.indexOf(":") + 1);
}

return TokenOutput.builder()
.token(token)
.build();
}
}

Expand Down

0 comments on commit d188714

Please sign in to comment.