/** * Decodes using URLDecoder - use when queries or form post values are decoded * @param value value to decode * @param enc encoding */ public static String urlDecode(String value, String enc) { return urlDecode(value, enc, false); }
/** * Decodes using URLDecoder - use when queries or form post values are decoded * @param value value to decode * @param enc encoding */ public static String urlDecode(String value, String enc) { return urlDecode(value, enc, false); }
public static String urlDecode(String value, String enc) { return UrlUtils.urlDecode(value, enc); }
public static String urlDecode(String value) { return UrlUtils.urlDecode(value); }
public static String urlDecode(String value) { return urlDecode(value, "UTF-8"); }
public static String urlDecode(String value) { return urlDecode(value, "UTF-8"); }
public static String urlDecode(String value, String enc) { return UrlUtils.urlDecode(value, enc); }
public static String urlDecode(String value) { return urlDecode(value, "UTF-8"); }
public static String urlDecode(String value) { return UrlUtils.urlDecode(value); }
/** * URL path segments may contain '+' symbols which should not be decoded into ' ' * This method replaces '+' with %2B and delegates to URLDecoder * @param value value to decode */ public static String pathDecode(String value) { return urlDecode(value, StandardCharsets.UTF_8.name(), true); }
/** * URL path segments may contain '+' symbols which should not be decoded into ' ' * This method replaces '+' with %2B and delegates to URLDecoder * @param value value to decode */ public static String pathDecode(String value) { return urlDecode(value, StandardCharsets.UTF_8.name(), true); }
public static String urlDecode(String value) { return urlDecode(value, StandardCharsets.UTF_8.name()); }
public static String urlDecode(String value) { return urlDecode(value, StandardCharsets.UTF_8.name()); }
/** * URL path segments may contain '+' symbols which should not be decoded into ' ' * This method replaces '+' with %2B and delegates to URLDecoder * @param value value to decode */ public static String pathDecode(String value) { // TODO: we actually need to do a proper URI analysis here according to // http://tools.ietf.org/html/rfc3986 for (int i = 0; i < RESERVED_CHARS.length; i++) { if (value.indexOf(RESERVED_CHARS[i]) != -1) { value = value.replace(RESERVED_CHARS[i], ENCODED_CHARS[i]); } } return urlDecode(value); }
/** * URL path segments may contain '+' symbols which should not be decoded into ' ' * This method replaces '+' with %2B and delegates to URLDecoder * @param value value to decode */ public static String pathDecode(String value) { // TODO: we actually need to do a proper URI analysis here according to // http://tools.ietf.org/html/rfc3986 for (int i = 0; i < RESERVED_CHARS.length; i++) { if (value.indexOf(RESERVED_CHARS[i]) != -1) { value = value.replace(RESERVED_CHARS[i], ENCODED_CHARS[i]); } } return urlDecode(value); }
/** * URL path segments may contain '+' symbols which should not be decoded into ' ' * This method replaces '+' with %2B and delegates to URLDecoder * @param value value to decode */ public static String pathDecode(String value) { // TODO: we actually need to do a proper URI analysis here according to // http://tools.ietf.org/html/rfc3986 for (int i = 0; i < RESERVED_CHARS.length; i++) { if (value.indexOf(RESERVED_CHARS[i]) != -1) { value = value.replace(RESERVED_CHARS[i], ENCODED_CHARS[i]); } } return urlDecode(value); }
@GET @Path("complete") public Response completeAuthentication(@Context OidcClientTokenContext oidcContext) { stateManager.setClientTokenContext(mc, oidcContext); URI redirectUri = null; MultivaluedMap<String, String> state = oidcContext.getState(); String location = state != null ? state.getFirst("state") : null; if (location == null && defaultLocation != null) { String basePath = (String)mc.get("http.base.path"); redirectUri = UriBuilder.fromUri(basePath).path(defaultLocation).build(); } else if (location != null) { redirectUri = URI.create(UrlUtils.urlDecode(location)); } if (redirectUri != null) { return Response.seeOther(redirectUri).build(); } return Response.ok(oidcContext).build(); }
protected TypeInfoObject parseType(String originalName, String setter, String value) throws SearchParseException { TypeInfo typeInfo = getTypeInfo(setter, value); if (isDecodeQueryValues()) { value = UrlUtils.urlDecode(value); } Object object = parseType(originalName, null, null, setter, typeInfo, value); return new TypeInfoObject(object, typeInfo); }
protected TypeInfoObject parseType(String originalName, String setter, String value) throws SearchParseException { TypeInfo typeInfo = getTypeInfo(setter, value); if (isDecodeQueryValues()) { value = UrlUtils.urlDecode(value); } Object object = parseType(originalName, null, null, setter, typeInfo, value); return new TypeInfoObject(object, typeInfo); }
private TypeInfoObject parseType(String originalName, String setter, String value) throws SearchParseException { String name = getSetter(setter); try { TypeInfo typeInfo = beanspector != null ? beanspector.getAccessorTypeInfo(name) : new TypeInfo(String.class, String.class); if (isDecodeQueryValues()) { value = UrlUtils.urlDecode(value); } Object object = parseType(originalName, null, null, setter, typeInfo, value); return new TypeInfoObject(object, typeInfo); } catch (Exception e) { throw new SearchParseException(e); } }