code: @ReadOperation
      public Map<String, Object> getSsoSessions(final String type) {
          val sessionsMap = new HashMap<String, Object>(1);
          val option = SsoSessionReportOptions.valueOf(type);
          val activeSsoSessions = getActiveSsoSessions(option);
          sessionsMap.put("activeSsoSessions", activeSsoSessions);
          val totalTicketGrantingTickets = new AtomicLong();
          val totalProxyGrantingTickets = new AtomicLong();
          val totalUsageCount = new AtomicLong();
          val uniquePrincipals = new HashSet<Object>();
          for (val activeSsoSession : activeSsoSessions) {
              if (activeSsoSession.containsKey(SsoSessionAttributeKeys.IS_PROXIED.toString())) {
                  val isProxied = Boolean.valueOf(activeSsoSession.get(SsoSessionAttributeKeys.IS_PROXIED.toString()).toString());
                  if (isProxied) {
                      totalProxyGrantingTickets.incrementAndGet();
                  } else {
                      totalTicketGrantingTickets.incrementAndGet();
                      val principal = activeSsoSession.get(SsoSessionAttributeKeys.AUTHENTICATED_PRINCIPAL.toString()).toString();
                      uniquePrincipals.add(principal);
                  }
              } else {
                  totalTicketGrantingTickets.incrementAndGet();
                  val principal = activeSsoSession.get(SsoSessionAttributeKeys.AUTHENTICATED_PRINCIPAL.toString()).toString();
                  uniquePrincipals.add(principal);
              }
              val uses = Long.parseLong(activeSsoSession.get(SsoSessionAttributeKeys.NUMBER_OF_USES.toString()).toString());
              totalUsageCount.getAndAdd(uses);
          }
          sessionsMap.put("totalProxyGrantingTickets", totalProxyGrantingTickets);
          sessionsMap.put("totalTicketGrantingTickets", totalTicketGrantingTickets);
          sessionsMap.put("totalTickets", totalTicketGrantingTickets.longValue() + totalProxyGrantingTickets.longValue());
          sessionsMap.put("totalPrincipals", uniquePrincipals.size());
          sessionsMap.put("totalUsageCount", totalUsageCount);
          return sessionsMap;
      }
docs: Endpoint for getting SSO Sessions in JSON format.
  
  @param type the type
  @return the sso sessions