@Override
    public void save(final boolean saveInSession, final UserProfile profile, final boolean multiProfile) {
        val clientId = getClientIdFromRequest();
        if (StringUtils.isNotBlank(clientId)) {
            profile.addAttribute(SESSION_CLIENT_ID, clientId);
        }
        super.save(saveInSession, profile, multiProfile);
    }
This is {@link OAuth20ClientIdAwareProfileManager}.
It saves returns a profile based on client_id from the request.

@author Kirill Gagarski
@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/OAuth20ClientIdAwareProfileManager.java