Skip to content

Commit 85e2d92

Browse files
committed
Merge remote-tracking branch 'origin/7.0.x'
2 parents bc6ce0d + b804da9 commit 85e2d92

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ org-sonarsource-scanner-gradle-sonarqube-gradle-plugin = "org.sonarsource.scanne
102102
org-instancio-instancio-junit = "org.instancio:instancio-junit:3.7.1"
103103

104104
spring-nullability = 'io.spring.nullability:io.spring.nullability.gradle.plugin:0.0.11'
105-
webauthn4j-core = 'com.webauthn4j:webauthn4j-core:0.29.7.RELEASE'
105+
webauthn4j-core = 'com.webauthn4j:webauthn4j-core:0.31.0.RELEASE'
106106
com-password4j-password4j = { module = "com.password4j:password4j", version.ref = "com-password4j" }
107107

108108
[plugins]

webauthn/spring-security-webauthn.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ dependencies {
1818
optional 'org.springframework:spring-jdbc'
1919
optional 'org.springframework:spring-tx'
2020
optional 'tools.jackson.core:jackson-databind'
21+
optional 'com.fasterxml.jackson.core:jackson-databind'
2122

2223
provided 'jakarta.servlet:jakarta.servlet-api'
2324

2425
testImplementation project(path: ':spring-security-core', configuration: 'tests')
26+
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor'
2527
testImplementation 'io.projectreactor:reactor-test'
2628
testImplementation 'jakarta.xml.bind:jakarta.xml.bind-api'
2729
testImplementation 'jakarta.websocket:jakarta.websocket-api'

webauthn/src/test/java/org/springframework/security/web/webauthn/api/TestAuthenticatorAttestationResponses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public final class TestAuthenticatorAttestationResponses {
2121
public static AuthenticatorAttestationResponse.AuthenticatorAttestationResponseBuilder createAuthenticatorAttestationResponse() {
2222
return AuthenticatorAttestationResponse.builder()
2323
.attestationObject(Bytes.fromBase64(
24-
"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YViUy9GqwTRaMpzVDbXq1dyEAXVOxrou08k22ggRC45MKNhdAAAAALraVWanqkAfvZZFYZpVEg0AEDWRLOHq0Wxw4cOkCemynKqlAQIDJiABIVgg4Hkrn2kbGmpZTdoDZUNrppo93OqgQV7ONzVvo5GLCFciWCCrf6yIQggq2BfZntawxRsBBbWG_FWkYAoU8yPipS-5hg-p1VREax-qKTGn1Bp92fRMjRMunH7XwSlf9mMWJdY3VvAkicTChlxVd256yk4jEiXiJ5BuwugdpT7fBOYtymjpQECAyYgASFYIJK-2epPEw0ujHN-gvVp2Hp3ef8CzU3zqwO5ylx8L2OsIlggK5x5OlTGEPxLS-85TAABum4aqVK4CSWJ7LYDdkjuBLk"))
24+
"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YViUy9GqwTRaMpzVDbXq1dyEAXVOxrou08k22ggRC45MKNhdAAAAALraVWanqkAfvZZFYZpVEg0AEDWRLOHq0Wxw4cOkCemynKqlAQIDJiABIVgg4Hkrn2kbGmpZTdoDZUNrppo93OqgQV7ONzVvo5GLCFciWCCrf6yIQggq2BfZntawxRsBBbWG_FWkYAoU8yPipS-5hg=="))
2525
.clientDataJSON(Bytes.fromBase64(
2626
"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoicTdsQ2RkM1NWUXhkQy12OHBuUkFHRW4xQjJNLXQ3WkVDV1B3Q0FtaFd2YyIsIm9yaWdpbiI6Imh0dHBzOi8vZXhhbXBsZS5sb2NhbGhvc3Q6ODQ0MyIsImNyb3NzT3JpZ2luIjpmYWxzZX0"))
2727
.transports(AuthenticatorTransport.HYBRID, AuthenticatorTransport.INTERNAL);

webauthn/src/test/java/org/springframework/security/web/webauthn/management/Webauthn4jRelyingPartyOperationsTests.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
import org.mockito.ArgumentCaptor;
4444
import org.mockito.Mock;
4545
import org.mockito.junit.jupiter.MockitoExtension;
46+
import tools.jackson.databind.json.JsonMapper;
47+
import tools.jackson.dataformat.cbor.CBORMapper;
4648

4749
import org.springframework.security.authentication.AnonymousAuthenticationToken;
4850
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -78,6 +80,7 @@
7880
import static org.assertj.core.api.Assertions.assertThatRuntimeException;
7981
import static org.mockito.ArgumentMatchers.any;
8082
import static org.mockito.BDDMockito.given;
83+
import static org.mockito.Mockito.RETURNS_SELF;
8184
import static org.mockito.Mockito.mock;
8285
import static org.mockito.Mockito.verifyNoInteractions;
8386

@@ -613,9 +616,11 @@ void authenticateThenWa4jRequestCredentialIdIsRawIdBytes() throws Exception {
613616

614617
ImmutableCredentialRecord credentialRecord = TestCredentialRecords.fullUserCredential().build();
615618
given(this.userCredentials.findByCredentialId(publicKey.getRawId())).willReturn(credentialRecord);
616-
ObjectMapper json = mock(ObjectMapper.class);
617-
ObjectMapper cbor = mock(ObjectMapper.class);
618-
given(cbor.getFactory()).willReturn(mock(CBORFactory.class));
619+
JsonMapper json = new JsonMapper();
620+
CBORMapper cbor = mock(CBORMapper.class);
621+
CBORMapper.Builder builder = mock(CBORMapper.Builder.class, RETURNS_SELF);
622+
given(builder.build()).willReturn(cbor);
623+
given(cbor.rebuild()).willReturn(builder);
619624
AttestationObject attestationObject = mock(AttestationObject.class);
620625
AuthenticatorData wa4jAuthData = mock(AuthenticatorData.class);
621626
given(attestationObject.getAuthenticatorData()).willReturn(wa4jAuthData);

0 commit comments

Comments
 (0)