Class StringOrURI


  • public final class StringOrURI
    extends Object
    This class provides an utility method for validating that a String is either an arbitrary string without any ":" characters or if the String does contain a ":" character then the String is a valid URI.
    Since:
    2.0.0
    See Also:
    StringOrURI
    • Method Detail

      • validateStringOrURI

        public static void validateStringOrURI​(String s)
        Validates that the given String is either an arbitrary string without any ":" characters, otherwise validates that the String is a valid URI.
        Parameters:
        s - The String to validate.
        Throws:
        JwtRuntimeException - if the given String contains a ":" character and is not a valid URI.