Class ClientUtil

java.lang.Object
com.okta.idx.sdk.api.util.ClientUtil

public class ClientUtil extends Object
  • Constructor Details

    • ClientUtil

      public ClientUtil()
  • Method Details

    • getNormalizedUri

      @Deprecated public static String getNormalizedUri(String issuer, String resourceUri)
      Deprecated.
      This method has been renamed to getNormalizedIssuerUri
      Construct the normalized URL given an issuer and a resource uri.
      Parameters:
      issuer - the issuer url
      resourceUri - the uri of resource
      Returns:
      the normalized full url
    • normalizedIssuerUri

      public static String normalizedIssuerUri(String issuer, String resourceUri)
      Construct the normalized URL given an issuer and a resource uri.
      Parameters:
      issuer - the issuer url
      resourceUri - the uri of resource
      Returns:
      the normalized full url
      Throws:
      IllegalArgumentException - if the issuer URi is malformed
    • isRootOrgIssuer

      public static boolean isRootOrgIssuer(String issuerUri)
      Check if the issuer is root/org URI. Issuer URL that does not follow the pattern '/oauth2/default' (or) '/oauth2/some_id_string' is considered root/org issuer. e.g. https://sample.okta.com (root/org url) https://sample.okta.com/oauth2/default (non-root issuer/org url) https://sample.okta.com/oauth2/ausar5cbq5TRRsbcJ0h7 (non-root issuer/org url)
      Parameters:
      issuerUri - the issuer uri
      Returns:
      true if root/org, false otherwise