test_class.file: src/server/src/test/java/io/cassandrareaper/resources/auth/LoginResourceTest.java
test_class.identifier: LoginResourceTest
test_case.body: @Test
    public void testLogin() throws IOException {
      try (InputStream is = ResourceUtils.getInputStreamForPath("classpath:shiro.ini")) {
        Ini ini = new Ini();
        ini.load(is);
        new WebIniSecurityManagerFactory(ini).getInstance().authenticate(new UsernamePasswordToken("admin", "admin"));
      }
    }
test_case.class_method_signature: LoginResourceTest.testLogin()
test_case.full_signature: @Test public void testLogin()
test_case.identifier: testLogin
test_case.invocations: getInputStreamForPath load authenticate getInstance
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLogin()
focal_class.file: src/server/src/main/java/io/cassandrareaper/resources/auth/LoginResource.java
focal_class.identifier: LoginResource
focal_class.class_method_signature: LoginResource.login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_class.full_signature: @Path("/login") @POST public void login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_class.identifier: login
focal_class.modifiers: @Path("/login") @POST public
focal_class.parameters: (
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_class.return: void
focal_class.signature: void login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_class.class_method_signature: LoginResource.logout(@Auth Subject subject)
focal_class.full_signature: @Path("/logout") @POST public void logout(@Auth Subject subject)
focal_class.identifier: logout
focal_class.modifiers: @Path("/logout") @POST public
focal_class.parameters: (@Auth Subject subject)
focal_class.return: void
focal_class.signature: void logout(@Auth Subject subject)
focal_class.class_method_signature: LoginResource.ensurePresent(String value, String message)
focal_class.full_signature: private void ensurePresent(String value, String message)
focal_class.identifier: ensurePresent
focal_class.modifiers: private
focal_class.parameters: (String value, String message)
focal_class.return: void
focal_class.signature: void ensurePresent(String value, String message)
focal_method.body: @Path("/login")
    @POST
    public void login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject) throws IOException {
  
      ensurePresent(username, "Invalid credentials: missing username.");
      ensurePresent(password, "Invalid credentials: missing password.");
  
      try {
        subject.login(new UsernamePasswordToken(username, password, rememberMe));
      } catch (AuthenticationException e) {
        throw new IncorrectCredentialsException("Invalid credentials combination for user: " + username);
      }
    }
focal_method.class_method_signature: LoginResource.login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_method.full_signature: @Path("/login") @POST public void login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_method.identifier: login
focal_method.invocations: ensurePresent ensurePresent login
focal_method.modifiers: @Path("/login") @POST public
focal_method.parameters: (
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)
focal_method.return: void
focal_method.signature: void login(
        @FormParam("username") String username,
        @FormParam("password") String password,
        @FormParam("rememberMe") boolean rememberMe,
        @Auth Subject subject)