@Test public void setAuthenticated_with_false_test() { WebAuthnAuthenticationRequest request = mock(WebAuthnAuthenticationRequest.class); WebAuthnAuthenticationParameters parameters = mock(WebAuthnAuthenticationParameters.class); WebAuthnAssertionAuthenticationToken token = new WebAuthnAssertionAuthenticationToken(request, parameters, null); token.setAuthenticated(false); assertThat(token.isAuthenticated()).isFalse(); }
@Override public void setAuthenticated(boolean isAuthenticated) { if (isAuthenticated) { throw new IllegalArgumentException( "Cannot set this authenticator to trusted"); } super.setAuthenticated(false); }
WebAuthnAssertionAuthenticationToken extends AbstractAuthenticationToken { @Override public void setAuthenticated(boolean isAuthenticated) { if (isAuthenticated) { throw new IllegalArgumentException( "Cannot set this authenticator to trusted"); } super.setAuthenticated(false); } }
WebAuthnAssertionAuthenticationToken extends AbstractAuthenticationToken { @Override public void setAuthenticated(boolean isAuthenticated) { if (isAuthenticated) { throw new IllegalArgumentException( "Cannot set this authenticator to trusted"); } super.setAuthenticated(false); } WebAuthnAssertionAuthenticationToken(
            WebAuthnAuthenticationRequest credentials,
            WebAuthnAuthenticationParameters parameters,
            Collection<? extends GrantedAuthority> authorities
    ); }
WebAuthnAssertionAuthenticationToken extends AbstractAuthenticationToken { @Override public void setAuthenticated(boolean isAuthenticated) { if (isAuthenticated) { throw new IllegalArgumentException( "Cannot set this authenticator to trusted"); } super.setAuthenticated(false); } WebAuthnAssertionAuthenticationToken(
            WebAuthnAuthenticationRequest credentials,
            WebAuthnAuthenticationParameters parameters,
            Collection<? extends GrantedAuthority> authorities
    ); @Override Object getPrincipal(); @Override WebAuthnAuthenticationRequest getCredentials(); WebAuthnAuthenticationParameters getParameters(); @Override void setAuthenticated(boolean isAuthenticated); @Override void eraseCredentials(); @Override boolean equals(Object o); @Override int hashCode(); }
WebAuthnAssertionAuthenticationToken extends AbstractAuthenticationToken { @Override public void setAuthenticated(boolean isAuthenticated) { if (isAuthenticated) { throw new IllegalArgumentException( "Cannot set this authenticator to trusted"); } super.setAuthenticated(false); } WebAuthnAssertionAuthenticationToken(
            WebAuthnAuthenticationRequest credentials,
            WebAuthnAuthenticationParameters parameters,
            Collection<? extends GrantedAuthority> authorities
    ); @Override Object getPrincipal(); @Override WebAuthnAuthenticationRequest getCredentials(); WebAuthnAuthenticationParameters getParameters(); @Override void setAuthenticated(boolean isAuthenticated); @Override void eraseCredentials(); @Override boolean equals(Object o); @Override int hashCode();  }