protected PasswordlessUserAccount buildPasswordlessUserAccount(final PasswordlessAuthenticationRequest request,
                                                                   final SearchResponse response) {
        val entry = response.getEntry();
        val acctBuilder = PasswordlessUserAccount
            .builder()
            .username(request.getUsername())
            .name(request.getUsername());

        setAttribute(entry, ldapProperties::getUsernameAttribute, acctBuilder::username);
        setAttribute(entry, ldapProperties::getNameAttribute, acctBuilder::name);
        setAttribute(entry, ldapProperties::getEmailAttribute, acctBuilder::email);
        setAttribute(entry, ldapProperties::getPhoneAttribute, acctBuilder::phone);
        setAttribute(entry, ldapProperties::getRequestPasswordAttribute,
            value -> acctBuilder.requestPassword(BooleanUtils.toBoolean(value)));

        val attributes = entry.getAttributes()
            .stream()
            .collect(Collectors.toMap(LdapAttribute::getName,
                attr -> new ArrayList<>(attr.getStringValues()), (__, b) -> b,
                () -> new LinkedHashMap<String, List<String>>(entry.getAttributes().size())));
        
        return acctBuilder.attributes(attributes).build();
    }
This is {@link LdapPasswordlessUserAccountStore}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-passwordless-ldap/src/main/java/org/apereo/cas/impl/account/LdapPasswordlessUserAccountStore.java