code: @Nullable
      public OAuthConnection parse(String email) {
          String domain = extractDomain(email);
          if (domain == null) {
              return null;
          }
  
          domain = domain.toLowerCase();
          for (OAuthConnection c : connections) {
              String mainDomain = domainForConnection(c);
              if (domain.equalsIgnoreCase(mainDomain)) {
                  return c;
              }
  
              List<String> aliases = c.valueForKey(DOMAIN_ALIASES_KEY, List.class);
              if (aliases != null) {
                  for (String d : aliases) {
                      if (d.equalsIgnoreCase(domain)) {
                          return c;
                      }
                  }
              }
          }
          return null;
      }
docs: Tries to find a valid domain with the given input.
  
  @param email to search the Domain for.
  @return a Connection if found, null otherwise.