Use !isAuthenticated

It's more verbose to see if the user is not null and not anonymous

Issue gh-16385
This commit is contained in:
Rob Winch 2025-03-25 13:49:20 -05:00
parent 4e20d56d2d
commit 593f7c4490
No known key found for this signature in database

View File

@ -345,7 +345,7 @@ public class Webauthn4JRelyingPartyOperations implements WebAuthnRelyingPartyOpe
}
private List<CredentialRecord> findCredentialRecords(Authentication authentication) {
if (authentication == null || this.trustResolver.isAnonymous(authentication)) {
if (!this.trustResolver.isAuthenticated(authentication)) {
return Collections.emptyList();
}
PublicKeyCredentialUserEntity userEntity = this.userEntities.findByUsername(authentication.getName());