public UserProfile toUserProfile(final String clientName) {
        val userProfile = new CommonProfile();
        userProfile.setId(this.id);
        userProfile.setLinkedId(this.linkedId);
        userProfile.addAttributes(this.attributes);
        userProfile.setClientName(clientName);
        return userProfile;
    }
To user profile based on given client name.

@param clientName the client name
@return the user profile
support/cas-server-support-pac4j-api/src/main/java/org/apereo/cas/authentication/principal/DelegatedAuthenticationCandidateProfile.java