Skip to content

Commit 4401673

Browse files
committed
Merge branch '3.2.x' into 3.3.x
Closes gh-42914
2 parents 6d2a75f + 7a185a0 commit 4401673

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/JsonEncodedDockerRegistryAuthentication.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
1818

1919
import java.util.Base64;
2020

21+
import com.fasterxml.jackson.annotation.JsonIgnore;
2122
import com.fasterxml.jackson.core.JsonProcessingException;
2223

2324
import org.springframework.boot.buildpack.platform.json.SharedObjectMapper;
@@ -30,6 +31,7 @@
3031
*/
3132
class JsonEncodedDockerRegistryAuthentication implements DockerRegistryAuthentication {
3233

34+
@JsonIgnore
3335
private String authHeader;
3436

3537
@Override

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryTokenAuthenticationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ void createAuthHeaderReturnsEncodedHeader() throws IOException, JSONException {
3939
DockerRegistryTokenAuthentication auth = new DockerRegistryTokenAuthentication("tokenvalue");
4040
String header = auth.getAuthHeader();
4141
String expectedJson = StreamUtils.copyToString(getContent("auth-token.json"), StandardCharsets.UTF_8);
42-
JSONAssert.assertEquals(expectedJson, new String(Base64.getUrlDecoder().decode(header)), false);
42+
JSONAssert.assertEquals(expectedJson, new String(Base64.getUrlDecoder().decode(header)), true);
4343
}
4444

4545
}

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryUserAuthenticationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ class DockerRegistryUserAuthenticationTests extends AbstractJsonTests {
3838
void createMinimalAuthHeaderReturnsEncodedHeader() throws IOException, JSONException {
3939
DockerRegistryUserAuthentication auth = new DockerRegistryUserAuthentication("user", "secret",
4040
"https://docker.example.com", "[email protected]");
41-
JSONAssert.assertEquals(jsonContent("auth-user-full.json"), decoded(auth.getAuthHeader()), false);
41+
JSONAssert.assertEquals(jsonContent("auth-user-full.json"), decoded(auth.getAuthHeader()), true);
4242
}
4343

4444
@Test

0 commit comments

Comments
 (0)