test_class.declarator: request
test_class.modifier: protected
test_class.original_string: protected HttpServletRequest request;
test_class.type: HttpServletRequest
test_class.var_name: request
test_class.declarator: response
test_class.modifier: protected
test_class.original_string: protected HttpServletResponse response;
test_class.type: HttpServletResponse
test_class.var_name: response
test_class.declarator: context
test_class.original_string: BasicAuthenticationHttpContext context;
test_class.type: BasicAuthenticationHttpContext
test_class.var_name: context
test_class.file: agent/osgi/src/test/java/org/jolokia/osgi/security/BasicAuthenticationHttpContextTest.java
test_class.identifier: BasicAuthenticationHttpContextTest
test_case.body: @Test(expectedExceptions = IllegalArgumentException.class,expectedExceptionsMessageRegExp = ".*BasicAuthentication.*")
      public void invalidMethod() throws IOException {
          expect(request.getHeader("Authorization")).andReturn("unknown Blub");
          replay(request, response);
  
          context.handleSecurity(request,response);
      }
test_case.class_method_signature: BasicAuthenticationHttpContextTest.invalidMethod()
test_case.full_signature: @Test(expectedExceptions = IllegalArgumentException.class,expectedExceptionsMessageRegExp = ".*BasicAuthentication.*") public void invalidMethod()
test_case.identifier: invalidMethod
test_case.invocations: andReturn expect getHeader replay handleSecurity
test_case.modifiers: @Test(expectedExceptions = IllegalArgumentException.class,expectedExceptionsMessageRegExp = ".*BasicAuthentication.*") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void invalidMethod()
focal_class.declarator: realm
focal_class.modifier: private final
focal_class.original_string: private final String realm;
focal_class.type: String
focal_class.var_name: realm
focal_class.declarator: authenticator
focal_class.modifier: private final
focal_class.original_string: private final Authenticator authenticator;
focal_class.type: Authenticator
focal_class.var_name: authenticator
focal_class.file: agent/osgi/src/main/java/org/jolokia/osgi/security/BasicAuthenticationHttpContext.java
focal_class.identifier: BasicAuthenticationHttpContext
focal_class.class_method_signature: BasicAuthenticationHttpContext.BasicAuthenticationHttpContext(String pRealm, Authenticator pAuthenticator)
focal_class.full_signature: public  BasicAuthenticationHttpContext(String pRealm, Authenticator pAuthenticator)
focal_class.identifier: BasicAuthenticationHttpContext
focal_class.modifiers: public
focal_class.parameters: (String pRealm, Authenticator pAuthenticator)
focal_class.signature:  BasicAuthenticationHttpContext(String pRealm, Authenticator pAuthenticator)
focal_class.class_method_signature: BasicAuthenticationHttpContext.handleSecurity(HttpServletRequest request, HttpServletResponse response)
focal_class.full_signature: public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
focal_class.identifier: handleSecurity
focal_class.modifiers: public
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response)
focal_class.return: boolean
focal_class.signature: boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
focal_class.superclass: extends DefaultHttpContext
focal_method.body: public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {
          if (!authenticator.authenticate(request)) {
              response.setHeader("WWW-Authenticate",HttpServletRequest.BASIC_AUTH + " realm=\""+realm+"\"");
              response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
              return false;
          } else {
              return true;
          }
      }
focal_method.class_method_signature: BasicAuthenticationHttpContext.handleSecurity(HttpServletRequest request, HttpServletResponse response)
focal_method.full_signature: public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
focal_method.identifier: handleSecurity
focal_method.invocations: authenticate setHeader sendError
focal_method.modifiers: public
focal_method.parameters: (HttpServletRequest request, HttpServletResponse response)
focal_method.return: boolean
focal_method.signature: boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)