Class UriUtil

java.lang.Object
com.sap.cloud.security.xsuaa.util.UriUtil

public class UriUtil extends Object
  • Method Details

    • replaceSubdomain

      public static URI replaceSubdomain(@Nonnull URI uri, @Nullable String subdomain)
      Utility method that replaces the subdomain of the URI with the given subdomain.
      Parameters:
      uri - the URI to be replaced.
      subdomain - of the tenant.
      Returns:
      the URI with the replaced subdomain or the passed URI in case a replacement was not possible.
    • expandPath

      @Nonnull public static URI expandPath(@Nonnull URI baseUri, String pathToAppend)
      Utility method that expands the path of the URI.
      Parameters:
      baseUri - the URI to be replaced.
      pathToAppend - the path to append.
      Returns:
      the URI with the path.