Class GrouperServiceJ2ee
java.lang.Object
edu.internet2.middleware.grouper.ws.GrouperServiceJ2ee
- All Implemented Interfaces:
javax.servlet.Filter
Extend the servlet to get user info
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assignHttpServlet
(javax.servlet.http.HttpServlet httpServlet) public method to get the http servletvoid
destroy()
filter methodvoid
doFilter
(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) void
init
(javax.servlet.FilterConfig arg0) filter methodstatic String
parameterValue
(Map<String, String[]> paramMap, javax.servlet.http.HttpServletRequest httpServletRequest, String key) get a single parameter value for key.static javax.servlet.http.HttpServlet
public method to get the http servletstatic javax.servlet.http.HttpServletRequest
public method to get the http servlet requeststatic javax.servlet.http.HttpServletResponse
public method to get the http servlet requeststatic long
if in request, get the start timestatic Subject
retrieveSubjectActAs
(WsSubjectLookup actAsLookup) retrieve the subject to act asstatic Subject
retrieve the subject logged in to web service If there are four colons, then this is the source and subjectId since overlap in namespacestatic String
retrieve the user principal (who is authenticated) from the (threadlocal) request objectstatic boolean
is this a wssec servlet? must have servlet init param
-
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 objecthttpServletRequest
- optional. if there, will make sure no dupeskey
- to lookup- Returns:
- the value
-
retrieveUserPrincipalNameFromRequest
retrieve the user principal (who is authenticated) from the (threadlocal) request object- Returns:
- the user principal name
-
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 interfacejavax.servlet.Filter
-
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 interfacejavax.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 interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-