code: public static UserProfile getUserProfile() {
          UserProfile userProfile = null;
          Subject subject = getSubject();
          Iterator<UserProfile> userProfilesIterator = subject.getPrivateCredentials(UserProfile.class).iterator();
          if (userProfilesIterator.hasNext()) {
              userProfile = userProfilesIterator.next();
          }
          return userProfile;
      }
docs: Get UserProfile for the subject on the thread.
  
  @return the user profile for the social media authenticated user.