Class GrouperServiceJ2ee

java.lang.Object
edu.internet2.middleware.grouper.ws.GrouperServiceJ2ee
All Implemented Interfaces:
javax.servlet.Filter

public class GrouperServiceJ2ee extends Object implements javax.servlet.Filter
Extend the servlet to get user info
  • Constructor Details

    • GrouperServiceJ2ee

      public GrouperServiceJ2ee()
  • Method Details

    • retrieveRequestStartMillis

      public static long retrieveRequestStartMillis()
      if in request, get the start time
      Returns:
      the start time
    • parameterValue

      public static String parameterValue(Map<String,String[]> paramMap, javax.servlet.http.HttpServletRequest httpServletRequest, String key)
      get a single parameter value for key. If multiple exist, throw error
      Parameters:
      paramMap - is the map of params. will get value from here if no request object
      httpServletRequest - optional. if there, will make sure no dupes
      key - to lookup
      Returns:
      the value
    • retrieveUserPrincipalNameFromRequest

      public static String retrieveUserPrincipalNameFromRequest()
      retrieve the user principal (who is authenticated) from the (threadlocal) request object
      Returns:
      the user principal name
    • retrieveSubjectLoggedIn

      public static Subject retrieveSubjectLoggedIn()
      retrieve the subject logged in to web service If there are four colons, then this is the source and subjectId since overlap in namespace
      Returns:
      the subject
    • retrieveSubjectActAs

      public static Subject retrieveSubjectActAs(WsSubjectLookup actAsLookup) throws WsInvalidQueryException
      retrieve the subject to act as
      Parameters:
      actAsLookup - that the caller wants to act as
      Returns:
      the subject
      Throws:
      WsInvalidQueryException - if there is a problem
    • retrieveHttpServletRequest

      public static javax.servlet.http.HttpServletRequest retrieveHttpServletRequest()
      public method to get the http servlet request
      Returns:
      the http servlet request
    • retrieveHttpServlet

      public static javax.servlet.http.HttpServlet retrieveHttpServlet()
      public method to get the http servlet
      Returns:
      the http servlet
    • wssecServlet

      public static boolean wssecServlet()
      is this a wssec servlet? must have servlet init param
      Returns:
      true if wssec
    • assignHttpServlet

      public static void assignHttpServlet(javax.servlet.http.HttpServlet httpServlet)
      public method to get the http servlet
      Parameters:
      httpServlet - is servlet to assign
    • retrieveHttpServletResponse

      public static javax.servlet.http.HttpServletResponse retrieveHttpServletResponse()
      public method to get the http servlet request
      Returns:
      the http servlet request
    • destroy

      public void destroy()
      filter method
      Specified by:
      destroy in interface javax.servlet.Filter
    • retrieveDebugMap

      public static Map<String,Object> retrieveDebugMap()
      Returns:
      the debug map
    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • init

      public void init(javax.servlet.FilterConfig arg0) throws javax.servlet.ServletException
      filter method
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException