Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
WebAuthnAuthenticationFilterTests asserts platform
Browse files Browse the repository at this point in the history
  • Loading branch information
rwinch committed Oct 16, 2024
1 parent e312b39 commit 151a26b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletContext;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.webauthn.api.TestPublicKeyCredentialRequestOptions;
import org.springframework.security.webauthn.api.AuthenticatorAssertionResponse;
import org.springframework.security.webauthn.api.PublicKeyCredentialRequestOptions;
import org.springframework.security.webauthn.api.AuthenticatorAttachment;
import org.springframework.security.webauthn.api.PublicKeyCredential;
import org.springframework.security.webauthn.api.PublicKeyCredentialRequestOptions;
import org.springframework.security.webauthn.api.TestPublicKeyCredentialRequestOptions;
import org.springframework.security.webauthn.authentication.WebAuthnAuthenticationRequestToken;
import org.springframework.security.webauthn.management.RelyingPartyAuthenticationRequest;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
Expand Down Expand Up @@ -165,7 +166,7 @@ void doFilterWhenValidThenOk() throws Exception {
assertThat(assertionResponse.getUserHandle().toBase64UrlString()).isEqualTo("Q3_0Xd64_HW0BlKRAJnVagJTpLKLgARCj8zjugpRnVo");
assertThat(publicKey.getClientExtensionResults().getOutputs()).isEmpty();
assertThat(authnRequest.getRequestOptions()).isEqualTo(options);
// FIXME: assert authenticatorAttachment: platform but does not exist on publicKey
assertThat(authnRequest.getPublicKey().getAuthenticatorAttachment()).isEqualTo(AuthenticatorAttachment.PLATFORM);
}

private static MockHttpServletRequest matchingRequest(String body) {
Expand Down

0 comments on commit 151a26b

Please sign in to comment.