public static URI asURI(final String s) {
        try {
            return new URI(s);
        } catch (final URISyntaxException e) {
            throw new TechnicalException("Cannot make an URI from: " + s, e);
        }
    }
Convert a string into an URI.

@param s the string
@return the URI
pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java