@Override
    public Optional<RegisteredCredential> lookup(final ByteArray credentialId, final ByteArray userHandle) {
        val registration = stream()
            .filter(Objects::nonNull)
            .filter(credReg -> credentialId.equals(credReg.getCredential().getCredentialId()))
            .findAny();

        return registration.flatMap(reg -> Optional.of(RegisteredCredential.builder()
            .credentialId(reg.getCredential().getCredentialId())
            .userHandle(reg.getUserIdentity().getId())
            .publicKeyCose(reg.getCredential().getPublicKeyCose())
            .signatureCount(reg.getCredential().getSignatureCount())
            .build()));
    }
This is {@link BaseWebAuthnCredentialRepository}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-webauthn-core/src/main/java/org/apereo/cas/webauthn/storage/BaseWebAuthnCredentialRepository.java