code: protected String getDiscoveryURL(String entityBaseURL, String entityAlias) {
          if (extendedMetadata != null && extendedMetadata.getIdpDiscoveryURL() != null
                  && extendedMetadata.getIdpDiscoveryURL().length() > 0) {
              return extendedMetadata.getIdpDiscoveryURL();
          } else {
              return getServerURL(entityBaseURL, entityAlias, getSAMLDiscoveryPath());
          }
      }
docs: Provides set discovery request url or generates a default when none was provided. Primarily value set on
  extenedMetadata property idpDiscoveryURL is used, when empty local property customDiscoveryURL is used, when
  empty URL is automatically generated.
  
  @param entityBaseURL
  base URL for generation of endpoints
  @param entityAlias
  alias of entity, or null when there's no alias required
  @return URL to use for IDP discovery request