@Override
    public void populateAttributes(final AuthenticationBuilder builder, final AuthenticationTransaction transaction) {
        transaction
            .getCredentials()
            .stream()
            .filter(this::supports)
            .map(UsernamePasswordCredential.class::cast)
            .forEach(upc -> upc.getCustomFields().forEach((key, value) -> builder.mergeAttribute(key, CollectionUtils.toCollection(value))));
    }
This is {@link CredentialCustomFieldsAttributeMetaDataPopulator}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/metadata/CredentialCustomFieldsAttributeMetaDataPopulator.java