test_class.declarator: ldapPort = 1389
test_class.modifier: static
test_class.original_string: static int ldapPort = 1389;
test_class.type: int
test_class.var_name: ldapPort
test_class.declarator: ds
test_class.modifier: private static
test_class.original_string: private static InMemoryDirectoryServer ds;
test_class.type: InMemoryDirectoryServer
test_class.var_name: ds
test_class.declarator: ldap
test_class.modifier: private
test_class.original_string: private LdapRealm ldap;
test_class.type: LdapRealm
test_class.var_name: ldap
test_class.file: fathom-security-ldap/src/test/java/fathom/realm/ldap/LdapRealmTest.java
test_class.identifier: LdapRealmTest
test_class.superclass: extends Assert
test_case.body: @Test
      public void testComplexEmail() {
          Map<String, Object> settings = getSettings();
          settings.put("emailMapping", "${givenName}.${surname}@gitblit.com");
          ldap = newRealm(settings);
  
          Account userOne = ldap.authenticate("UserOne", "userOnePassword");
          assertNotNull(userOne);
          assertTrue(userOne.getEmailAddresses().contains("User.One@gitblit.com"));
      }
test_case.class_method_signature: LdapRealmTest.testComplexEmail()
test_case.full_signature: @Test public void testComplexEmail()
test_case.identifier: testComplexEmail
test_case.invocations: getSettings put newRealm authenticate assertNotNull assertTrue contains getEmailAddresses
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testComplexEmail()
focal_class.declarator: log = LoggerFactory.getLogger(LdapRealm.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger log = LoggerFactory.getLogger(LdapRealm.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: ldapUrl
focal_class.modifier: protected
focal_class.original_string: protected String ldapUrl;
focal_class.type: String
focal_class.var_name: ldapUrl
focal_class.declarator: ldapUsername
focal_class.modifier: protected
focal_class.original_string: protected String ldapUsername;
focal_class.type: String
focal_class.var_name: ldapUsername
focal_class.declarator: ldapPassword
focal_class.modifier: protected
focal_class.original_string: protected String ldapPassword;
focal_class.type: String
focal_class.var_name: ldapPassword
focal_class.declarator: ldapBindPattern
focal_class.modifier: protected
focal_class.original_string: protected String ldapBindPattern;
focal_class.type: String
focal_class.var_name: ldapBindPattern
focal_class.declarator: accountBase
focal_class.modifier: protected
focal_class.original_string: protected String accountBase;
focal_class.type: String
focal_class.var_name: accountBase
focal_class.declarator: accountPattern
focal_class.modifier: protected
focal_class.original_string: protected String accountPattern;
focal_class.type: String
focal_class.var_name: accountPattern
focal_class.declarator: groupBase
focal_class.modifier: protected
focal_class.original_string: protected String groupBase;
focal_class.type: String
focal_class.var_name: groupBase
focal_class.declarator: groupMemberPattern
focal_class.modifier: protected
focal_class.original_string: protected String groupMemberPattern;
focal_class.type: String
focal_class.var_name: groupMemberPattern
focal_class.declarator: nameMapping
focal_class.modifier: protected
focal_class.original_string: protected String nameMapping;
focal_class.type: String
focal_class.var_name: nameMapping
focal_class.declarator: emailMapping
focal_class.modifier: protected
focal_class.original_string: protected String emailMapping;
focal_class.type: String
focal_class.var_name: emailMapping
focal_class.declarator: adminGroups
focal_class.modifier: protected
focal_class.original_string: protected List<String> adminGroups;
focal_class.type: List<String>
focal_class.var_name: adminGroups
focal_class.file: fathom-security-ldap/src/main/java/fathom/realm/ldap/LdapRealm.java
focal_class.identifier: LdapRealm
focal_class.class_method_signature: LdapRealm.escapeLDAPSearchFilter(String filter)
focal_class.full_signature: public static final String escapeLDAPSearchFilter(String filter)
focal_class.identifier: escapeLDAPSearchFilter
focal_class.modifiers: public static final
focal_class.parameters: (String filter)
focal_class.return: String
focal_class.signature: String escapeLDAPSearchFilter(String filter)
focal_class.class_method_signature: LdapRealm.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: LdapRealm.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: LdapRealm.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: LdapRealm.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: LdapRealm.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: LdapRealm.getLdapConnection()
focal_class.full_signature: private LDAPConnection getLdapConnection()
focal_class.identifier: getLdapConnection
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: LDAPConnection
focal_class.signature: LDAPConnection getLdapConnection()
focal_class.class_method_signature: LdapRealm.isAuthenticated(LDAPConnection ldapConnection, String userDn, String password)
focal_class.full_signature: private boolean isAuthenticated(LDAPConnection ldapConnection, String userDn, String password)
focal_class.identifier: isAuthenticated
focal_class.modifiers: private
focal_class.parameters: (LDAPConnection ldapConnection, String userDn, String password)
focal_class.return: boolean
focal_class.signature: boolean isAuthenticated(LDAPConnection ldapConnection, String userDn, String password)
focal_class.class_method_signature: LdapRealm.doSearch(LDAPConnection ldapConnection, String base, String filter)
focal_class.full_signature: private SearchResult doSearch(LDAPConnection ldapConnection, String base, String filter)
focal_class.identifier: doSearch
focal_class.modifiers: private
focal_class.parameters: (LDAPConnection ldapConnection, String base, String filter)
focal_class.return: SearchResult
focal_class.signature: SearchResult doSearch(LDAPConnection ldapConnection, String base, String filter)
focal_class.class_method_signature: LdapRealm.doSearch(LDAPConnection ldapConnection, String base, boolean dereferenceAliases, String filter, List<String> attributes)
focal_class.full_signature: private SearchResult doSearch(LDAPConnection ldapConnection, String base, boolean dereferenceAliases, String filter, List<String> attributes)
focal_class.identifier: doSearch
focal_class.modifiers: private
focal_class.parameters: (LDAPConnection ldapConnection, String base, boolean dereferenceAliases, String filter, List<String> attributes)
focal_class.return: SearchResult
focal_class.signature: SearchResult doSearch(LDAPConnection ldapConnection, String base, boolean dereferenceAliases, String filter, List<String> attributes)
focal_class.class_method_signature: LdapRealm.setAccountRoles(LDAPConnection ldapConnection, SearchResultEntry accountSearchResult, Account account)
focal_class.full_signature: private void setAccountRoles(LDAPConnection ldapConnection, SearchResultEntry accountSearchResult, Account account)
focal_class.identifier: setAccountRoles
focal_class.modifiers: private
focal_class.parameters: (LDAPConnection ldapConnection, SearchResultEntry accountSearchResult, Account account)
focal_class.return: void
focal_class.signature: void setAccountRoles(LDAPConnection ldapConnection, SearchResultEntry accountSearchResult, Account account)
focal_class.class_method_signature: LdapRealm.setAccountAttributes(SearchResultEntry userSearchResult, Account account)
focal_class.full_signature: private void setAccountAttributes(SearchResultEntry userSearchResult, Account account)
focal_class.identifier: setAccountAttributes
focal_class.modifiers: private
focal_class.parameters: (SearchResultEntry userSearchResult, Account account)
focal_class.return: void
focal_class.signature: void setAccountAttributes(SearchResultEntry userSearchResult, Account account)
focal_class.class_method_signature: LdapRealm.setAdminAttribute(Account account)
focal_class.full_signature: private void setAdminAttribute(Account account)
focal_class.identifier: setAdminAttribute
focal_class.modifiers: private
focal_class.parameters: (Account account)
focal_class.return: void
focal_class.signature: void setAdminAttribute(Account account)
focal_class.class_method_signature: LdapRealm.getSimpleUsername(String username)
focal_class.full_signature: private String getSimpleUsername(String username)
focal_class.identifier: getSimpleUsername
focal_class.modifiers: private
focal_class.parameters: (String username)
focal_class.return: String
focal_class.signature: String getSimpleUsername(String username)
focal_class.superclass: extends CachingRealm
focal_method.body: @Override
      public Account authenticate(StandardCredentials requestCredentials) {
  
          final String username = getSimpleUsername(requestCredentials.getUsername());
          final String password = requestCredentials.getPassword();
  
          if (hasAccount(username)) {
              // account is cached, authenticate against the cache
              return super.authenticate(new StandardCredentials(username, password));
          }
  
          return authenticate(username, password);
      }
focal_method.class_method_signature: LdapRealm.authenticate(StandardCredentials requestCredentials)
focal_method.full_signature: @Override public Account authenticate(StandardCredentials requestCredentials)
focal_method.identifier: authenticate
focal_method.invocations: getSimpleUsername 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)