Skip to content

Commit 593f7c4

Browse files
committed
Use !isAuthenticated
It's more verbose to see if the user is not null and not anonymous Issue gh-16385
1 parent 4e20d56 commit 593f7c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public PublicKeyCredentialRequestOptions createCredentialRequestOptions(
345345
}
346346

347347
private List<CredentialRecord> findCredentialRecords(Authentication authentication) {
348-
if (authentication == null || this.trustResolver.isAnonymous(authentication)) {
348+
if (!this.trustResolver.isAuthenticated(authentication)) {
349349
return Collections.emptyList();
350350
}
351351
PublicKeyCredentialUserEntity userEntity = this.userEntities.findByUsername(authentication.getName());

0 commit comments

Comments
 (0)