test_class.file: webapp/impl/src/test/java/cloud/piranha/webapp/impl/DefaultSecurityManagerTest.java
test_class.identifier: DefaultSecurityManagerTest
test_case.body: @Test
      void testAddUser() {
          TestWebApplicationRequest request = new TestWebApplicationRequest();
          request.setUserPrincipal(new UserPrincipal("username"));
          DefaultSecurityManager securityManager = new DefaultSecurityManager();
          securityManager.addUser("username", "password", new String[]{"role1", "role2"});
          assertTrue(securityManager.isUserInRole(request, "role1"));
      }
test_case.class_method_signature: DefaultSecurityManagerTest.testAddUser()
test_case.full_signature: @Test void testAddUser()
test_case.identifier: testAddUser
test_case.invocations: setUserPrincipal addUser assertTrue isUserInRole
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddUser()
focal_class.declarator: denyUncoveredHttpMethods = false
focal_class.modifier: protected
focal_class.original_string: protected boolean denyUncoveredHttpMethods = false;
focal_class.type: boolean
focal_class.var_name: denyUncoveredHttpMethods
focal_class.declarator: logins = new HashMap<>()
focal_class.modifier: protected final
focal_class.original_string: protected final HashMap<String, String> logins = new HashMap<>();
focal_class.type: HashMap<String, String>
focal_class.var_name: logins
focal_class.declarator: roles = new ArrayList<>()
focal_class.modifier: protected
focal_class.original_string: protected ArrayList<String> roles = new ArrayList<>();
focal_class.type: ArrayList<String>
focal_class.var_name: roles
focal_class.declarator: userRoles = new HashMap<>()
focal_class.modifier: protected final
focal_class.original_string: protected final HashMap<String, String[]> userRoles = new HashMap<>();
focal_class.type: HashMap<String, String[]>
focal_class.var_name: userRoles
focal_class.declarator: webApplication
focal_class.modifier: protected
focal_class.original_string: protected WebApplication webApplication;
focal_class.type: WebApplication
focal_class.var_name: webApplication
focal_class.file: webapp/impl/src/main/java/cloud/piranha/webapp/impl/DefaultSecurityManager.java
focal_class.identifier: DefaultSecurityManager
focal_class.interfaces: implements SecurityManager
focal_class.class_method_signature: DefaultSecurityManager.addUser(String username, String password, String... roles)
focal_class.full_signature: public void addUser(String username, String password, String... roles)
focal_class.identifier: addUser
focal_class.modifiers: public
focal_class.parameters: (String username, String password, String... roles)
focal_class.return: void
focal_class.signature: void addUser(String username, String password, String... roles)
focal_class.class_method_signature: DefaultSecurityManager.addUserRole(String username, String... roles)
focal_class.full_signature: public void addUserRole(String username, String... roles)
focal_class.identifier: addUserRole
focal_class.modifiers: public
focal_class.parameters: (String username, String... roles)
focal_class.return: void
focal_class.signature: void addUserRole(String username, String... roles)
focal_class.class_method_signature: DefaultSecurityManager.authenticate(
              HttpServletRequest request, HttpServletResponse response)
focal_class.full_signature: @Override public boolean authenticate(
              HttpServletRequest request, HttpServletResponse response)
focal_class.identifier: authenticate
focal_class.modifiers: @Override public
focal_class.parameters: (
              HttpServletRequest request, HttpServletResponse response)
focal_class.return: boolean
focal_class.signature: boolean authenticate(
              HttpServletRequest request, HttpServletResponse response)
focal_class.class_method_signature: DefaultSecurityManager.declareRoles(String[] roles)
focal_class.full_signature: @Override public void declareRoles(String[] roles)
focal_class.identifier: declareRoles
focal_class.modifiers: @Override public
focal_class.parameters: (String[] roles)
focal_class.return: void
focal_class.signature: void declareRoles(String[] roles)
focal_class.class_method_signature: DefaultSecurityManager.getRoles()
focal_class.full_signature: @Override public Set<String> getRoles()
focal_class.identifier: getRoles
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getRoles()
focal_class.class_method_signature: DefaultSecurityManager.getDenyUncoveredHttpMethods()
focal_class.full_signature: @Override public boolean getDenyUncoveredHttpMethods()
focal_class.identifier: getDenyUncoveredHttpMethods
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getDenyUncoveredHttpMethods()
focal_class.class_method_signature: DefaultSecurityManager.getWebApplication()
focal_class.full_signature: @Override public WebApplication getWebApplication()
focal_class.identifier: getWebApplication
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: WebApplication
focal_class.signature: WebApplication getWebApplication()
focal_class.class_method_signature: DefaultSecurityManager.isUserInRole(HttpServletRequest request, String role)
focal_class.full_signature: @Override public boolean isUserInRole(HttpServletRequest request, String role)
focal_class.identifier: isUserInRole
focal_class.modifiers: @Override public
focal_class.parameters: (HttpServletRequest request, String role)
focal_class.return: boolean
focal_class.signature: boolean isUserInRole(HttpServletRequest request, String role)
focal_class.class_method_signature: DefaultSecurityManager.login(HttpServletRequest request, String username, String password)
focal_class.full_signature: @Override public void login(HttpServletRequest request, String username, String password)
focal_class.identifier: login
focal_class.modifiers: @Override public
focal_class.parameters: (HttpServletRequest request, String username, String password)
focal_class.return: void
focal_class.signature: void login(HttpServletRequest request, String username, String password)
focal_class.class_method_signature: DefaultSecurityManager.logout(HttpServletRequest request, HttpServletResponse response)
focal_class.full_signature: @Override public void logout(HttpServletRequest request, HttpServletResponse response)
focal_class.identifier: logout
focal_class.modifiers: @Override public
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void logout(HttpServletRequest request, HttpServletResponse response)
focal_class.class_method_signature: DefaultSecurityManager.removeUser(String username)
focal_class.full_signature: public void removeUser(String username)
focal_class.identifier: removeUser
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: void
focal_class.signature: void removeUser(String username)
focal_class.class_method_signature: DefaultSecurityManager.setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)
focal_class.full_signature: @Override public void setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)
focal_class.identifier: setDenyUncoveredHttpMethods
focal_class.modifiers: @Override public
focal_class.parameters: (boolean denyUncoveredHttpMethods)
focal_class.return: void
focal_class.signature: void setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)
focal_class.class_method_signature: DefaultSecurityManager.setWebApplication(WebApplication webApplication)
focal_class.full_signature: @Override public void setWebApplication(WebApplication webApplication)
focal_class.identifier: setWebApplication
focal_class.modifiers: @Override public
focal_class.parameters: (WebApplication webApplication)
focal_class.return: void
focal_class.signature: void setWebApplication(WebApplication webApplication)
focal_method.body: public void addUser(String username, String password, String... roles) {
          logins.put(username, password);
          if (roles != null) {
              userRoles.put(username, roles);
          }
      }
focal_method.class_method_signature: DefaultSecurityManager.addUser(String username, String password, String... roles)
focal_method.full_signature: public void addUser(String username, String password, String... roles)
focal_method.identifier: addUser
focal_method.invocations: put put
focal_method.modifiers: public
focal_method.parameters: (String username, String password, String... roles)
focal_method.return: void
focal_method.signature: void addUser(String username, String password, String... roles)