@Test public void testDoFilter() throws Exception { MockFilterChain filterChain = new MockFilterChain(); subject.doFilter(new MockHttpServletRequest(), new MockHttpServletResponse(), filterChain); HttpServletRequest request = (HttpServletRequest) filterChain.getRequest(); assertEquals("urn:collab:person:example.com:admin", request.getHeader(UID_HEADER_NAME)); assertEquals(3, list(request.getHeaderNames()).size()); }
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { SetHeader wrapper = new SetHeader((HttpServletRequest) servletRequest); wrapper.setHeader(UID_HEADER_NAME, "urn:collab:person:example.com:admin"); wrapper.setHeader(SHIB_AUTHENTICATING_AUTHORITY, PolicyLoader.authenticatingAuthority); wrapper.setHeader(DISPLAY_NAME_HEADER_NAME, "John Doe"); filterChain.doFilter(wrapper, servletResponse); }
MockShibbolethFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { SetHeader wrapper = new SetHeader((HttpServletRequest) servletRequest); wrapper.setHeader(UID_HEADER_NAME, "urn:collab:person:example.com:admin"); wrapper.setHeader(SHIB_AUTHENTICATING_AUTHORITY, PolicyLoader.authenticatingAuthority); wrapper.setHeader(DISPLAY_NAME_HEADER_NAME, "John Doe"); filterChain.doFilter(wrapper, servletResponse); } }
MockShibbolethFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { SetHeader wrapper = new SetHeader((HttpServletRequest) servletRequest); wrapper.setHeader(UID_HEADER_NAME, "urn:collab:person:example.com:admin"); wrapper.setHeader(SHIB_AUTHENTICATING_AUTHORITY, PolicyLoader.authenticatingAuthority); wrapper.setHeader(DISPLAY_NAME_HEADER_NAME, "John Doe"); filterChain.doFilter(wrapper, servletResponse); } MockShibbolethFilter(); }
MockShibbolethFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { SetHeader wrapper = new SetHeader((HttpServletRequest) servletRequest); wrapper.setHeader(UID_HEADER_NAME, "urn:collab:person:example.com:admin"); wrapper.setHeader(SHIB_AUTHENTICATING_AUTHORITY, PolicyLoader.authenticatingAuthority); wrapper.setHeader(DISPLAY_NAME_HEADER_NAME, "John Doe"); filterChain.doFilter(wrapper, servletResponse); } MockShibbolethFilter(); @Override void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain); }
MockShibbolethFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { SetHeader wrapper = new SetHeader((HttpServletRequest) servletRequest); wrapper.setHeader(UID_HEADER_NAME, "urn:collab:person:example.com:admin"); wrapper.setHeader(SHIB_AUTHENTICATING_AUTHORITY, PolicyLoader.authenticatingAuthority); wrapper.setHeader(DISPLAY_NAME_HEADER_NAME, "John Doe"); filterChain.doFilter(wrapper, servletResponse); } MockShibbolethFilter(); @Override void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain);  }