test_class.declarator: authFilter
test_class.modifier: private
test_class.original_string: private AuthFilter authFilter;
test_class.type: AuthFilter
test_class.var_name: authFilter
test_class.file: modality-webapp-auth/src/test/java/com/republicate/modality/webapp/auth/BaseAuthFilterTest.java
test_class.identifier: BaseAuthFilterTest
test_class.superclass: extends BaseWebappMockTest
test_case.body: @Test
      public void processProtectedRequest() throws Exception
      {
          recordConfig();
          expect(request.getRequestURI()).andAnswer(eval("/some-uri"));
          expect(request.getParameter("Good-Login")).andAnswer(eval("Nestor"));
          expect(request.getCharacterEncoding()).andAnswer(eval("utf-8"));
          expect(request.getRequestURI()).andAnswer(eval("/some-uri"));
          filterChain.doFilter(request, response);
          replayAll();
          authFilter = new AuthFilter();
          authFilter.init(filterConfig);
          authFilter.doFilter(request, response, filterChain);
      }
test_case.class_method_signature: BaseAuthFilterTest.processProtectedRequest()
test_case.full_signature: @Test public void processProtectedRequest()
test_case.identifier: processProtectedRequest
test_case.invocations: recordConfig andAnswer expect getRequestURI eval andAnswer expect getParameter eval andAnswer expect getCharacterEncoding eval andAnswer expect getRequestURI eval doFilter replayAll init doFilter
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void processProtectedRequest()
focal_class.declarator: logger = LoggerFactory.getLogger("auth")
focal_class.modifier: protected static
focal_class.original_string: protected static Logger logger = LoggerFactory.getLogger("auth");
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: REALM = "auth.realm"
focal_class.modifier: public static final
focal_class.original_string: public static final String REALM = "auth.realm";
focal_class.type: String
focal_class.var_name: REALM
focal_class.declarator: PROTECTED_RESOURCES = "auth.protected"
focal_class.modifier: public static final
focal_class.original_string: public static final String PROTECTED_RESOURCES = "auth.protected";
focal_class.type: String
focal_class.var_name: PROTECTED_RESOURCES
focal_class.declarator: PUBLIC_RESOURCES = "auth.public"
focal_class.modifier: public static final
focal_class.original_string: public static final String PUBLIC_RESOURCES = "auth.public";
focal_class.type: String
focal_class.var_name: PUBLIC_RESOURCES
focal_class.declarator: realm = null
focal_class.modifier: private
focal_class.original_string: private String realm = null;
focal_class.type: String
focal_class.var_name: realm
focal_class.declarator: protectedResources = null
focal_class.modifier: private
focal_class.original_string: private Pattern protectedResources = null;
focal_class.type: Pattern
focal_class.var_name: protectedResources
focal_class.declarator: publicResources = null
focal_class.modifier: private
focal_class.original_string: private Pattern publicResources = null;
focal_class.type: Pattern
focal_class.var_name: publicResources
focal_class.file: modality-webapp-auth/src/main/java/com/republicate/modality/webapp/auth/BaseAuthFilter.java
focal_class.identifier: BaseAuthFilter
focal_class.class_method_signature: BaseAuthFilter.isProtectedURI(String uri)
focal_class.full_signature: protected boolean isProtectedURI(String uri)
focal_class.identifier: isProtectedURI
focal_class.modifiers: protected
focal_class.parameters: (String uri)
focal_class.return: boolean
focal_class.signature: boolean isProtectedURI(String uri)
focal_class.class_method_signature: BaseAuthFilter.processPublicRequest(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.full_signature: protected void processPublicRequest(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.identifier: processPublicRequest
focal_class.modifiers: protected
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.return: void
focal_class.signature: void processPublicRequest(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.class_method_signature: BaseAuthFilter.getAuthentifiedUser(HttpServletRequest request)
focal_class.full_signature: protected USER getAuthentifiedUser(HttpServletRequest request)
focal_class.identifier: getAuthentifiedUser
focal_class.modifiers: protected
focal_class.parameters: (HttpServletRequest request)
focal_class.return: USER
focal_class.signature: USER getAuthentifiedUser(HttpServletRequest request)
focal_class.class_method_signature: BaseAuthFilter.authenticate(HttpServletRequest request)
focal_class.full_signature: protected abstract USER authenticate(HttpServletRequest request)
focal_class.identifier: authenticate
focal_class.modifiers: protected abstract
focal_class.parameters: (HttpServletRequest request)
focal_class.return: USER
focal_class.signature: USER authenticate(HttpServletRequest request)
focal_class.class_method_signature: BaseAuthFilter.processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.full_signature: protected void processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.identifier: processProtectedRequest
focal_class.modifiers: protected
focal_class.parameters: (USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.return: void
focal_class.signature: void processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.class_method_signature: BaseAuthFilter.processForbiddenRequest(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.full_signature: protected void processForbiddenRequest(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.identifier: processForbiddenRequest
focal_class.modifiers: protected
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.return: void
focal_class.signature: void processForbiddenRequest(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_class.class_method_signature: BaseAuthFilter.init(FilterConfig filterConfig)
focal_class.full_signature: @Override public void init(FilterConfig filterConfig)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (FilterConfig filterConfig)
focal_class.return: void
focal_class.signature: void init(FilterConfig filterConfig)
focal_class.class_method_signature: BaseAuthFilter.doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain)
focal_class.full_signature: @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain)
focal_class.identifier: doFilter
focal_class.modifiers: @Override public
focal_class.parameters: (ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain)
focal_class.return: void
focal_class.signature: void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain)
focal_class.class_method_signature: BaseAuthFilter.destroy()
focal_class.full_signature: @Override public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_class.class_method_signature: BaseAuthFilter.displayUser(USER user)
focal_class.full_signature: protected String displayUser(USER user)
focal_class.identifier: displayUser
focal_class.modifiers: protected
focal_class.parameters: (USER user)
focal_class.return: String
focal_class.signature: String displayUser(USER user)
focal_class.class_method_signature: BaseAuthFilter.getRealm()
focal_class.full_signature: protected final String getRealm()
focal_class.identifier: getRealm
focal_class.modifiers: protected final
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRealm()
focal_class.superclass: extends ModalityFilter
focal_method.body: protected void processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException
      {
          if (logger.isDebugEnabled())
          {
              // CB TODO - other uris logging should decode uris
              String characterEncoding = Optional.ofNullable(request.getCharacterEncoding()).orElse("utf-8");
              logger.debug("user '{}' going towards {}", displayUser(logged), URLDecoder.decode(request.getRequestURI(), characterEncoding));
          }
          filterChain.doFilter(request, response);
      }
focal_method.class_method_signature: BaseAuthFilter.processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_method.full_signature: protected void processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_method.identifier: processProtectedRequest
focal_method.invocations: isDebugEnabled orElse ofNullable getCharacterEncoding debug displayUser decode getRequestURI doFilter
focal_method.modifiers: protected
focal_method.parameters: (USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
focal_method.return: void
focal_method.signature: void processProtectedRequest(USER logged, HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)