test_class.file: fathom-security-redis/src/test/java/fathom/realm/redis/RedisRealmTest.java
test_class.identifier: RedisRealmTest
test_class.superclass: extends Assert
test_case.body: @Test
      public void basicTest() {
          RedisRealm realm = getRealm();
          Account account = null;
  
          // Phineas
          account = realm.authenticate("phineas", "fail");
          assertNull(account);
          account = realm.authenticate("phineas", "iKnowWhatWereGonnaDoToday");
          assertNotNull(account);
          assertEquals("phineas", account.getUsername());
          assertEquals("Phineas Flynn", account.getName());
          assertTrue(account.getEmailAddresses().contains("phineas.flynn@disney.com"));
          assertTrue(account.hasRole("inventor"));
          assertTrue(account.isPermitted("secure:view"));
  
          // Ferb
          account = realm.authenticate("ferb", "fail");
          assertNull(account);
          account = realm.authenticate("ferb", "ferb");
          assertNotNull(account);
          assertEquals("ferb", account.getUsername());
          assertEquals("Ferb Fletcher", account.getName());
          assertTrue(account.getEmailAddresses().contains("ferb.fletcher@disney.com"));
          assertTrue(account.hasRole("inventor"));
          assertTrue(account.isPermitted("secure:view"));
  
          // Candace
          account = realm.authenticate("candace", "fail");
          assertNull(account);
          account = realm.authenticate("candace", "ilovejeremy");
          assertNotNull(account);
          assertEquals("candace", account.getUsername());
          assertEquals("Candace Flynn", account.getName());
          assertTrue(account.getEmailAddresses().contains("candace.flynn@disney.com"));
          assertFalse(account.hasRole("inventor"));
          assertTrue(account.isPermitted("secure:view"));
  
          // Linda
          account = realm.authenticate("linda", "fail");
          assertNull(account);
          account = realm.authenticate("linda", "imLindanaAndIWannaHaveFun");
          assertNotNull(account);
          assertEquals("linda", account.getUsername());
          assertEquals("Linda Flynn-Fletcher", account.getName());
          assertTrue(account.getEmailAddresses().contains("linda.fletcher@disney.com"));
          assertFalse(account.hasRole("inventor"));
          assertFalse(account.isPermitted("secure:view"));
  
          // Doofenshmirtz
          account = realm.authenticate("heinz", "CurseYouPerryThePlatypus");
          assertNull(account);
  
      }
test_case.class_method_signature: RedisRealmTest.basicTest()
test_case.full_signature: @Test public void basicTest()
test_case.identifier: basicTest
test_case.invocations: getRealm authenticate assertNull authenticate assertNotNull assertEquals getUsername assertEquals getName assertTrue contains getEmailAddresses assertTrue hasRole assertTrue isPermitted authenticate assertNull authenticate assertNotNull assertEquals getUsername assertEquals getName assertTrue contains getEmailAddresses assertTrue hasRole assertTrue isPermitted authenticate assertNull authenticate assertNotNull assertEquals getUsername assertEquals getName assertTrue contains getEmailAddresses assertFalse hasRole assertTrue isPermitted authenticate assertNull authenticate assertNotNull assertEquals getUsername assertEquals getName assertTrue contains getEmailAddresses assertFalse hasRole assertFalse isPermitted authenticate assertNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void basicTest()
focal_class.declarator: log = LoggerFactory.getLogger(RedisRealm.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger log = LoggerFactory.getLogger(RedisRealm.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: pool
focal_class.modifier: private
focal_class.original_string: private JedisPool pool;
focal_class.type: JedisPool
focal_class.var_name: pool
focal_class.declarator: redisUrl
focal_class.modifier: private
focal_class.original_string: private String redisUrl;
focal_class.type: String
focal_class.var_name: redisUrl
focal_class.declarator: redisPassword
focal_class.modifier: private
focal_class.original_string: private String redisPassword;
focal_class.type: String
focal_class.var_name: redisPassword
focal_class.declarator: passwordMapping
focal_class.modifier: private
focal_class.original_string: private String passwordMapping;
focal_class.type: String
focal_class.var_name: passwordMapping
focal_class.declarator: nameMapping
focal_class.modifier: private
focal_class.original_string: private String nameMapping;
focal_class.type: String
focal_class.var_name: nameMapping
focal_class.declarator: emailMapping
focal_class.modifier: private
focal_class.original_string: private String emailMapping;
focal_class.type: String
focal_class.var_name: emailMapping
focal_class.declarator: roleMapping
focal_class.modifier: private
focal_class.original_string: private String roleMapping;
focal_class.type: String
focal_class.var_name: roleMapping
focal_class.declarator: permissionMapping
focal_class.modifier: private
focal_class.original_string: private String permissionMapping;
focal_class.type: String
focal_class.var_name: permissionMapping
focal_class.declarator: startScript
focal_class.modifier: private
focal_class.original_string: private String startScript;
focal_class.type: String
focal_class.var_name: startScript
focal_class.declarator: stopScript
focal_class.modifier: private
focal_class.original_string: private String stopScript;
focal_class.type: String
focal_class.var_name: stopScript
focal_class.file: fathom-security-redis/src/main/java/fathom/realm/redis/RedisRealm.java
focal_class.identifier: RedisRealm
focal_class.class_method_signature: RedisRealm.RedisRealm()
focal_class.full_signature: public  RedisRealm()
focal_class.identifier: RedisRealm
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  RedisRealm()
focal_class.class_method_signature: RedisRealm.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: RedisRealm.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: RedisRealm.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: RedisRealm.authenticate(StandardCredentials requestCredentials)
focal_class.full_signature: @Override public Account authenticate(StandardCredentials requestCredentials)
focal_class.identifier: authenticate
focal_class.modifiers: @Override public
focal_class.parameters: (StandardCredentials requestCredentials)
focal_class.return: Account
focal_class.signature: Account authenticate(StandardCredentials requestCredentials)
focal_class.class_method_signature: RedisRealm.authenticate(final String username, final String password)
focal_class.full_signature: @Override public Account authenticate(final String username, final String password)
focal_class.identifier: authenticate
focal_class.modifiers: @Override public
focal_class.parameters: (final String username, final String password)
focal_class.return: Account
focal_class.signature: Account authenticate(final String username, final String password)
focal_class.class_method_signature: RedisRealm.key(String username, String pattern)
focal_class.full_signature: private String key(String username, String pattern)
focal_class.identifier: key
focal_class.modifiers: private
focal_class.parameters: (String username, String pattern)
focal_class.return: String
focal_class.signature: String key(String username, String pattern)
focal_class.class_method_signature: RedisRealm.asNull(String value)
focal_class.full_signature: private String asNull(String value)
focal_class.identifier: asNull
focal_class.modifiers: private
focal_class.parameters: (String value)
focal_class.return: String
focal_class.signature: String asNull(String value)
focal_class.class_method_signature: RedisRealm.asArray(Collection<String> strings)
focal_class.full_signature: private String[] asArray(Collection<String> strings)
focal_class.identifier: asArray
focal_class.modifiers: private
focal_class.parameters: (Collection<String> strings)
focal_class.return: String[]
focal_class.signature: String[] asArray(Collection<String> strings)
focal_class.class_method_signature: RedisRealm.unwrapQuotes(String value)
focal_class.full_signature: private String unwrapQuotes(String value)
focal_class.identifier: unwrapQuotes
focal_class.modifiers: private
focal_class.parameters: (String value)
focal_class.return: String
focal_class.signature: String unwrapQuotes(String value)
focal_class.class_method_signature: RedisRealm.executeScript(String scriptPath)
focal_class.full_signature: protected void executeScript(String scriptPath)
focal_class.identifier: executeScript
focal_class.modifiers: protected
focal_class.parameters: (String scriptPath)
focal_class.return: void
focal_class.signature: void executeScript(String scriptPath)
focal_class.class_method_signature: RedisRealm.executeScript(URL scriptUrl)
focal_class.full_signature: protected void executeScript(URL scriptUrl)
focal_class.identifier: executeScript
focal_class.modifiers: protected
focal_class.parameters: (URL scriptUrl)
focal_class.return: void
focal_class.signature: void executeScript(URL scriptUrl)
focal_class.superclass: extends CachingRealm
focal_method.body: @Override
      public Account authenticate(StandardCredentials requestCredentials) {
  
          final String username = requestCredentials.getUsername();
          final String password = requestCredentials.getPassword();
  
          if (hasAccount(username)) {
              // account is cached, authenticate against the cache
              return super.authenticate(requestCredentials);
          }
  
          return authenticate(username, password);
      }
focal_method.class_method_signature: RedisRealm.authenticate(StandardCredentials requestCredentials)
focal_method.full_signature: @Override public Account authenticate(StandardCredentials requestCredentials)
focal_method.identifier: authenticate
focal_method.invocations: getUsername getPassword hasAccount authenticate authenticate
focal_method.modifiers: @Override public
focal_method.parameters: (StandardCredentials requestCredentials)
focal_method.return: Account
focal_method.signature: Account authenticate(StandardCredentials requestCredentials)