code: private static String findCurrentClientName(final J2EContext webContext) {
          val pm = new ProfileManager<>(webContext, webContext.getSessionStore());
          val profile = pm.get(true);
          return profile.map(CommonProfile::getClientName).orElse(null);
      }
docs: Finds the current client name from the context, using the PAC4J Profile Manager. It is assumed that the context has previously been
  populated with the profile.
  
  @param webContext A web context (request + response).
  @return The currently used client's name or {@code null} if there is no active profile.