|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright 2002-2024 the original author or authors.
|
|
|
+ * Copyright 2002-2025 the original author or authors.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -548,6 +548,15 @@ class Webauthn4jRelyingPartyOperationsTests {
|
|
|
assertThat(credentialRequestOptions.getAllowCredentials()).isEmpty();
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ void shouldReturnEmptyCredentialsWhenAnonymousUserIsDisabled() {
|
|
|
+ PublicKeyCredentialRequestOptionsRequest createRequest = new ImmutablePublicKeyCredentialRequestOptionsRequest(null);
|
|
|
+ PublicKeyCredentialRequestOptions credentialRequestOptions = this.rpOperations
|
|
|
+ .createCredentialRequestOptions(createRequest);
|
|
|
+
|
|
|
+ assertThat(credentialRequestOptions.getAllowCredentials()).isEmpty();
|
|
|
+ }
|
|
|
+
|
|
|
private static AuthenticatorAttestationResponse setFlag(byte... flags) throws Exception {
|
|
|
AuthenticatorAttestationResponseBuilder authAttResponseBldr = TestAuthenticatorAttestationResponse
|
|
|
.createAuthenticatorAttestationResponse();
|