Class ClientUtil


  • public class ClientUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String getNormalizedUri​(java.lang.String issuer, java.lang.String resourceUri)
      Deprecated.
      This method has been renamed to getNormalizedIssuerUri
      static boolean isRootOrgIssuer​(java.lang.String issuerUri)
      Check if the issuer is root/org URI.
      static java.lang.String normalizedIssuerUri​(java.lang.String issuer, java.lang.String resourceUri)
      Construct the normalized URL given an issuer and a resource uri.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClientUtil

        public ClientUtil()
    • Method Detail

      • getNormalizedUri

        @Deprecated
        public static java.lang.String getNormalizedUri​(java.lang.String issuer,
                                                        java.lang.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 java.lang.String normalizedIssuerUri​(java.lang.String issuer,
                                                           java.lang.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:
        java.lang.IllegalArgumentException - if the issuer URi is malformed
      • isRootOrgIssuer

        public static boolean isRootOrgIssuer​(java.lang.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