@Override
    public boolean provision(final Principal principal, final Credential credential) {
        return FunctionUtils.doUnchecked(() -> {
            LOGGER.info("Searching Syncope to find [{}]", principal.getId());
            val userList = SyncopeUtils.syncopeUserSearch(properties, principal.getId());
            if (userList.isEmpty()) {
                return createUserResource(principal, credential);
            }
            return userList
                .stream()
                .allMatch(Unchecked.predicate(__ -> updateUserResource(principal)));
        });
    }
This is {@link SyncopePrincipalProvisioner}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-syncope-authentication/src/main/java/org/apereo/cas/syncope/SyncopePrincipalProvisioner.java