소스 검색

Use !isAuthenticated

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

Issue gh-16385
Rob Winch 5 달 전
부모
커밋
593f7c4490
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      web/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java

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

@@ -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());