Class RequestUtils


  • public final class RequestUtils
    extends java.lang.Object
    Since:
    0.5.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String encodeUrl​(java.lang.String value, boolean path, boolean canonical)  
      static java.lang.String getFormattedDate​(java.util.Date inDate)
      Convert supplied Date object into ISO 8601 formatted date string (e.g.
      static boolean isDefaultPort​(java.net.URI uri)
      Returns true if the specified URI uses a standard port (i.e.
      • Methods inherited from class java.lang.Object

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

      • isDefaultPort

        public static boolean isDefaultPort​(java.net.URI uri)
        Returns true if the specified URI uses a standard port (i.e. http == 80 or https == 443), false otherwise.
        Parameters:
        uri - true if the specified URI uses a standard port
        Returns:
        true if the specified URI is using a non-standard port, false otherwise
      • encodeUrl

        public static java.lang.String encodeUrl​(java.lang.String value,
                                                 boolean path,
                                                 boolean canonical)
      • getFormattedDate

        public static java.lang.String getFormattedDate​(java.util.Date inDate)
        Convert supplied Date object into ISO 8601 formatted date string (e.g. 2017-11-30T21:15:16Z) that Okta core supports.
        Parameters:
        inDate -
        Returns:
        ISO formatted string