Package org.forgerock.json.jose.utils
Class StringOrURI
- java.lang.Object
-
- org.forgerock.json.jose.utils.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-