test_class.declarator: auth
test_class.modifier: private
test_class.original_string: private JaasAuthenticator auth;
test_class.type: JaasAuthenticator
test_class.var_name: auth
test_class.file: agent/jvm/src/test/java/org/jolokia/jvmagent/security/JaasAuthenticatorTest.java
test_class.identifier: JaasAuthenticatorTest
test_class.superclass: extends BaseAuthenticatorTest
test_case.body: @Test
      public void testAuthenticateNoAuthorizationHeader() throws Exception {
          Headers respHeader = new Headers();
          HttpExchange ex = createHttpExchange(respHeader);
  
          Authenticator.Result res = auth.authenticate(ex);
  
          assertEquals(((Authenticator.Retry) res).getResponseCode(),401);
          assertTrue(respHeader.containsKey("WWW-Authenticate"));
          assertTrue(respHeader.getFirst("WWW-Authenticate").contains("jolokia"));
      }
test_case.class_method_signature: JaasAuthenticatorTest.testAuthenticateNoAuthorizationHeader()
test_case.full_signature: @Test public void testAuthenticateNoAuthorizationHeader()
test_case.identifier: testAuthenticateNoAuthorizationHeader
test_case.invocations: createHttpExchange authenticate assertEquals getResponseCode assertTrue containsKey assertTrue contains getFirst
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAuthenticateNoAuthorizationHeader()
focal_class.declarator: subjectThreadLocal = new ThreadLocal<Subject>()
focal_class.modifier: private
focal_class.original_string: private ThreadLocal<Subject> subjectThreadLocal = new ThreadLocal<Subject>();
focal_class.type: ThreadLocal<Subject>
focal_class.var_name: subjectThreadLocal
focal_class.file: agent/jvm/src/main/java/org/jolokia/jvmagent/security/JaasAuthenticator.java
focal_class.identifier: JaasAuthenticator
focal_class.class_method_signature: JaasAuthenticator.JaasAuthenticator(String pRealm)
focal_class.full_signature: public  JaasAuthenticator(String pRealm)
focal_class.identifier: JaasAuthenticator
focal_class.modifiers: public
focal_class.parameters: (String pRealm)
focal_class.signature:  JaasAuthenticator(String pRealm)
focal_class.class_method_signature: JaasAuthenticator.authenticate(HttpExchange pHttpExchange)
focal_class.full_signature: @Override public Result authenticate(HttpExchange pHttpExchange)
focal_class.identifier: authenticate
focal_class.modifiers: @Override public
focal_class.parameters: (HttpExchange pHttpExchange)
focal_class.return: Result
focal_class.signature: Result authenticate(HttpExchange pHttpExchange)
focal_class.class_method_signature: JaasAuthenticator.checkCredentials(String pUser, String pPassword)
focal_class.full_signature: @Override public boolean checkCredentials(String pUser, String pPassword)
focal_class.identifier: checkCredentials
focal_class.modifiers: @Override public
focal_class.parameters: (String pUser, String pPassword)
focal_class.return: boolean
focal_class.signature: boolean checkCredentials(String pUser, String pPassword)
focal_class.class_method_signature: JaasAuthenticator.createLoginContext(String realm, CallbackHandler handler)
focal_class.full_signature: protected LoginContext createLoginContext(String realm, CallbackHandler handler)
focal_class.identifier: createLoginContext
focal_class.modifiers: protected
focal_class.parameters: (String realm, CallbackHandler handler)
focal_class.return: LoginContext
focal_class.signature: LoginContext createLoginContext(String realm, CallbackHandler handler)
focal_class.superclass: extends BasicAuthenticator
focal_method.body: @Override
      public Result authenticate(HttpExchange pHttpExchange) {
          try {
              Result result = super.authenticate(pHttpExchange);
              if (result instanceof Success) {
                  Subject subject = subjectThreadLocal.get();
                  if (subject != null) {
                      pHttpExchange.setAttribute(ConfigKey.JAAS_SUBJECT_REQUEST_ATTRIBUTE, subject);
                  }
              }
              return result;
          } finally {
              subjectThreadLocal.remove();
          }
      }
focal_method.class_method_signature: JaasAuthenticator.authenticate(HttpExchange pHttpExchange)
focal_method.full_signature: @Override public Result authenticate(HttpExchange pHttpExchange)
focal_method.identifier: authenticate
focal_method.invocations: authenticate get setAttribute remove
focal_method.modifiers: @Override public
focal_method.parameters: (HttpExchange pHttpExchange)
focal_method.return: Result
focal_method.signature: Result authenticate(HttpExchange pHttpExchange)