@@ -2457,6 +2457,49 @@ class RelyingPartyV2AssertionSpec
24572457 )
24582458 }
24592459
2460+ it(" a generated Ed448 key." ) {
2461+ val registrationTestData =
2462+ RegistrationTestData .Packed .BasicAttestationEd448
2463+ val testData = registrationTestData.assertion.get
2464+
2465+ val rp = RelyingParty
2466+ .builder()
2467+ .identity(
2468+ RelyingPartyIdentity .builder().id(" localhost" ).name(" Test RP" ).build()
2469+ )
2470+ .credentialRepositoryV2(
2471+ Helpers .CredentialRepositoryV2 .withUser(
2472+ registrationTestData.userId,
2473+ credentialId = registrationTestData.response.getId,
2474+ publicKeyCose =
2475+ registrationTestData.response.getResponse.getParsedAuthenticatorData.getAttestedCredentialData.get.getCredentialPublicKey,
2476+ )
2477+ )
2478+ .usernameRepository(
2479+ Helpers .UsernameRepository .withUsers(registrationTestData.userId)
2480+ )
2481+ .build()
2482+
2483+ val result = rp.finishAssertion(
2484+ FinishAssertionOptions
2485+ .builder()
2486+ .request(testData.request)
2487+ .response(testData.response)
2488+ .build()
2489+ )
2490+
2491+ result.isSuccess should be(true )
2492+ result.getCredential.getUserHandle should equal(
2493+ registrationTestData.userId.getId
2494+ )
2495+ result.getCredential.getCredentialId should equal(
2496+ registrationTestData.response.getId
2497+ )
2498+ result.getCredential.getCredentialId should equal(
2499+ testData.response.getId
2500+ )
2501+ }
2502+
24602503 describe(" an RS1 key" ) {
24612504 def test (registrationTestData : RegistrationTestData ): Unit = {
24622505 val testData = registrationTestData.assertion.get
0 commit comments