public Optional<UserProfile> getProfile() {
        val allProfiles = retrieveAll(true);
        return ProfileHelper.flatIntoOneProfile(allProfiles.values());
    }
Retrieve the first user profile if it exists, ignoring any {@link AnonymousProfile} if possible.

@return the user profile
pac4j-core/src/main/java/org/pac4j/core/profile/ProfileManager.java