Skip to content

Commit 2373bff

Browse files
authored
fix: handle empty access_token sent by harbor
1 parent dc70f97 commit 2373bff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jkube-kit/helm/src/main/java/org/eclipse/jkube/kit/resource/helm/oci/OCIRegistryInterceptor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private String parseAccessTokenFromResponse(String responseBody) {
145145
if (responseBodyObj.containsKey(TOKEN_KEY)) {
146146
tokenFound = (String) responseBodyObj.get(TOKEN_KEY);
147147
}
148-
if (responseBodyObj.containsKey(ACCESS_TOKEN_KEY)) {
148+
if (StringUtils.isBlank(tokenFound) && responseBodyObj.containsKey(ACCESS_TOKEN_KEY)) {
149149
tokenFound = (String) responseBodyObj.get(ACCESS_TOKEN_KEY);
150150
}
151151

0 commit comments

Comments
 (0)