docs: @SuppressWarnings("unchecked")
      private static ISecurityContext getCasContext(ISecurityContext context) {
          if (context instanceof ICasSecurityContext) {
              return context;
          }
          Enumeration contextEnum = context.getSubContexts();
          while (contextEnum.hasMoreElements()) {
              ISecurityContext subContext = (ISecurityContext) contextEnum.nextElement();
              if (subContext instanceof ICasSecurityContext) {
                  return subContext;
              }
          }
          return null;
      }