code: protected CommonProfile buildUserProfile(final TokenCredentials tokenCredentials,
                                               final WebContext webContext,
                                               final AccessToken accessToken) {
          val userProfile = new CommonProfile(true);
          val authentication = accessToken.getAuthentication();
          val principal = authentication.getPrincipal();
  
          userProfile.setId(principal.getId());
  
          val attributes = new HashMap<String, Object>(principal.getAttributes());
          attributes.putAll(authentication.getAttributes());
          userProfile.addAttributes(attributes);
  
          LOGGER.trace("Built user profile based on access token [{}] is [{}]", accessToken, userProfile);
          return userProfile;
      }
docs: Build user profile common profile.
  
  @param tokenCredentials the token credentials
  @param webContext       the web context
  @param accessToken      the access token
  @return the common profile