code: public boolean securityDomainHasLoginModule(String domainName, String moduleName) throws Exception {
          Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY, SECURITY_DOMAIN, domainName);
          addr.add(AUTHENTICATION, CLASSIC);
          addr.add(LOGIN_MODULE, moduleName);
          ModelNode request = createRequest("read-resource", addr);
          ModelNode response = execute(request);
          return isSuccess(response);
      }
docs: Check if a certain login module is present inside the passed security domain
  @param domainName Name of the security domain
  @param moduleName Name of the Login module - wich usually is it FQCN
  @return True if the module is present
  @throws Exception any error