test_class.declarator: htpasswd
test_class.original_string: HtpasswdRealm htpasswd;
test_class.type: HtpasswdRealm
test_class.var_name: htpasswd
test_class.file: fathom-security-htpasswd/src/test/java/fathom/realm/htpasswd/HtpasswdRealmTest.java
test_class.identifier: HtpasswdRealmTest
test_class.superclass: extends Assert
test_case.body: @Test
      public void testAuthenticate() {
  
          htpasswd.setAllowClearTextPasswords(true);
  
          Account account = htpasswd.authenticate("user1", "pass1");
          assertNotNull(account);
          assertEquals("user1", account.getUsername());
  
          account = htpasswd.authenticate("user2", "pass2");
          assertNotNull(account);
          assertEquals("user2", account.getUsername());
  
          // Test different encryptions
          account = htpasswd.authenticate("plain", "passWord");
          assertNotNull(account);
          assertEquals("plain", account.getUsername());
  
          htpasswd.setAllowClearTextPasswords(false);
          account = htpasswd.authenticate("crypt", "password");
          assertNotNull(account);
          assertEquals("crypt", account.getUsername());
  
          account = htpasswd.authenticate("md5", "password");
          assertNotNull(account);
          assertEquals("md5", account.getUsername());
  
          account = htpasswd.authenticate("sha", "password");
          assertNotNull(account);
          assertEquals("sha", account.getUsername());
  
  
          // Test leading and trailing whitespace
          account = htpasswd.authenticate("trailing", "whitespace");
          assertNotNull(account);
          assertEquals("trailing", account.getUsername());
  
          account = htpasswd.authenticate("tabbed", "frontAndBack");
          assertNotNull(account);
          assertEquals("tabbed", account.getUsername());
  
          account = htpasswd.authenticate("leading", "whitespace");
          assertNotNull(account);
          assertEquals("leading", account.getUsername());
      }
test_case.class_method_signature: HtpasswdRealmTest.testAuthenticate()
test_case.full_signature: @Test public void testAuthenticate()
test_case.identifier: testAuthenticate
test_case.invocations: setAllowClearTextPasswords authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername setAllowClearTextPasswords authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername authenticate assertNotNull assertEquals getUsername
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAuthenticate()
focal_class.declarator: log = LoggerFactory.getLogger(HtpasswdRealm.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger log = LoggerFactory.getLogger(HtpasswdRealm.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: credentialsMap
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> credentialsMap;
focal_class.type: Map<String, String>
focal_class.var_name: credentialsMap
focal_class.declarator: file
focal_class.modifier: private
focal_class.original_string: private String file;
focal_class.type: String
focal_class.var_name: file
focal_class.declarator: realmFile
focal_class.modifier: private volatile
focal_class.original_string: private volatile File realmFile;
focal_class.type: File
focal_class.var_name: realmFile
focal_class.declarator: lastModified
focal_class.modifier: private volatile
focal_class.original_string: private volatile long lastModified;
focal_class.type: long
focal_class.var_name: lastModified
focal_class.declarator: isAllowClearTextPasswords
focal_class.modifier: private
focal_class.original_string: private boolean isAllowClearTextPasswords;
focal_class.type: boolean
focal_class.var_name: isAllowClearTextPasswords
focal_class.file: fathom-security-htpasswd/src/main/java/fathom/realm/htpasswd/HtpasswdRealm.java
focal_class.identifier: HtpasswdRealm
focal_class.class_method_signature: HtpasswdRealm.HtpasswdRealm()
focal_class.full_signature: public  HtpasswdRealm()
focal_class.identifier: HtpasswdRealm
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HtpasswdRealm()
focal_class.class_method_signature: HtpasswdRealm.canAuthenticate(AuthenticationToken authenticationToken)
focal_class.full_signature: @Override public boolean canAuthenticate(AuthenticationToken authenticationToken)
focal_class.identifier: canAuthenticate
focal_class.modifiers: @Override public
focal_class.parameters: (AuthenticationToken authenticationToken)
focal_class.return: boolean
focal_class.signature: boolean canAuthenticate(AuthenticationToken authenticationToken)
focal_class.class_method_signature: HtpasswdRealm.setup(Config config)
focal_class.full_signature: @Override public void setup(Config config)
focal_class.identifier: setup
focal_class.modifiers: @Override public
focal_class.parameters: (Config config)
focal_class.return: void
focal_class.signature: void setup(Config config)
focal_class.class_method_signature: HtpasswdRealm.start()
focal_class.full_signature: @Override public void start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: HtpasswdRealm.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: HtpasswdRealm.isAllowClearTextPasswords()
focal_class.full_signature: public boolean isAllowClearTextPasswords()
focal_class.identifier: isAllowClearTextPasswords
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAllowClearTextPasswords()
focal_class.class_method_signature: HtpasswdRealm.setAllowClearTextPasswords(boolean value)
focal_class.full_signature: public void setAllowClearTextPasswords(boolean value)
focal_class.identifier: setAllowClearTextPasswords
focal_class.modifiers: public
focal_class.parameters: (boolean value)
focal_class.return: void
focal_class.signature: void setAllowClearTextPasswords(boolean value)
focal_class.class_method_signature: HtpasswdRealm.setFile(File realmFile)
focal_class.full_signature: public synchronized void setFile(File realmFile)
focal_class.identifier: setFile
focal_class.modifiers: public synchronized
focal_class.parameters: (File realmFile)
focal_class.return: void
focal_class.signature: void setFile(File realmFile)
focal_class.class_method_signature: HtpasswdRealm.hasAccount(String username)
focal_class.full_signature: @Override public boolean hasAccount(String username)
focal_class.identifier: hasAccount
focal_class.modifiers: @Override public
focal_class.parameters: (String username)
focal_class.return: boolean
focal_class.signature: boolean hasAccount(String username)
focal_class.class_method_signature: HtpasswdRealm.getAccount(String username)
focal_class.full_signature: @Override public Account getAccount(String username)
focal_class.identifier: getAccount
focal_class.modifiers: @Override public
focal_class.parameters: (String username)
focal_class.return: Account
focal_class.signature: Account getAccount(String username)
focal_class.class_method_signature: HtpasswdRealm.authenticate(AuthenticationToken authenticationToken)
focal_class.full_signature: @Override public Account authenticate(AuthenticationToken authenticationToken)
focal_class.identifier: authenticate
focal_class.modifiers: @Override public
focal_class.parameters: (AuthenticationToken authenticationToken)
focal_class.return: Account
focal_class.signature: Account authenticate(AuthenticationToken authenticationToken)
focal_class.class_method_signature: HtpasswdRealm.validatePassword(StandardCredentials requestCredentials, StandardCredentials storedCredentials)
focal_class.full_signature: @Override protected boolean validatePassword(StandardCredentials requestCredentials, StandardCredentials storedCredentials)
focal_class.identifier: validatePassword
focal_class.modifiers: @Override protected
focal_class.parameters: (StandardCredentials requestCredentials, StandardCredentials storedCredentials)
focal_class.return: boolean
focal_class.signature: boolean validatePassword(StandardCredentials requestCredentials, StandardCredentials storedCredentials)
focal_class.class_method_signature: HtpasswdRealm.readCredentialsFile()
focal_class.full_signature: protected synchronized void readCredentialsFile()
focal_class.identifier: readCredentialsFile
focal_class.modifiers: protected synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void readCredentialsFile()
focal_class.class_method_signature: HtpasswdRealm.readCredentialsURL(URL url)
focal_class.full_signature: protected Map<String, String> readCredentialsURL(URL url)
focal_class.identifier: readCredentialsURL
focal_class.modifiers: protected
focal_class.parameters: (URL url)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> readCredentialsURL(URL url)
focal_class.superclass: extends MemoryRealm
focal_method.body: @Override
      public Account authenticate(AuthenticationToken authenticationToken) {
          readCredentialsFile();
          return super.authenticate(authenticationToken);
      }
focal_method.class_method_signature: HtpasswdRealm.authenticate(AuthenticationToken authenticationToken)
focal_method.full_signature: @Override public Account authenticate(AuthenticationToken authenticationToken)
focal_method.identifier: authenticate
focal_method.invocations: readCredentialsFile authenticate
focal_method.modifiers: @Override public
focal_method.parameters: (AuthenticationToken authenticationToken)
focal_method.return: Account
focal_method.signature: Account authenticate(AuthenticationToken authenticationToken)