@Test public void testGetRequestedUrl() { doTestGetRequestedUrl("", null); doTestGetRequestedUrl("", ""); doTestGetRequestedUrl("?gee=moo", "gee=moo"); doTestGetRequestedUrl("?gee=moo&abc=def", "gee=moo&abc=def"); doTestGetRequestedUrl("?gee=moo+def", "gee=moo+def"); doTestGetRequestedUrl("?gee=moo", "gee=moo&conversationId=1234"); doTestGetRequestedUrl("?gee=moo", "conversationId=1234&gee=moo"); doTestGetRequestedUrl("", "conversationId=1234"); }
public static String getRequestedUrl(HttpServletRequest request) { String path = getRequestedPage(request); try { path = new URI(null, null, path, null).toASCIIString(); } catch (URISyntaxException e) { } String qs = request.getQueryString(); if (StringUtils.isNotEmpty(qs)) { if (qs.contains(CONVERSATION_ID)) { List<NameValuePair> list = URLEncodedUtils.parse(qs, UTF_8); if (list.removeIf(pair -> pair.getName().equals(CONVERSATION_ID))) { qs = URLEncodedUtils.format(list, UTF_8); } } if (!qs.isEmpty()) { path = path + '?' + qs; } } return path; }
NuxeoAuthenticationFilter implements Filter { public static String getRequestedUrl(HttpServletRequest request) { String path = getRequestedPage(request); try { path = new URI(null, null, path, null).toASCIIString(); } catch (URISyntaxException e) { } String qs = request.getQueryString(); if (StringUtils.isNotEmpty(qs)) { if (qs.contains(CONVERSATION_ID)) { List<NameValuePair> list = URLEncodedUtils.parse(qs, UTF_8); if (list.removeIf(pair -> pair.getName().equals(CONVERSATION_ID))) { qs = URLEncodedUtils.format(list, UTF_8); } } if (!qs.isEmpty()) { path = path + '?' + qs; } } return path; } }
NuxeoAuthenticationFilter implements Filter { public static String getRequestedUrl(HttpServletRequest request) { String path = getRequestedPage(request); try { path = new URI(null, null, path, null).toASCIIString(); } catch (URISyntaxException e) { } String qs = request.getQueryString(); if (StringUtils.isNotEmpty(qs)) { if (qs.contains(CONVERSATION_ID)) { List<NameValuePair> list = URLEncodedUtils.parse(qs, UTF_8); if (list.removeIf(pair -> pair.getName().equals(CONVERSATION_ID))) { qs = URLEncodedUtils.format(list, UTF_8); } } if (!qs.isEmpty()) { path = path + '?' + qs; } } return path; }  }
NuxeoAuthenticationFilter implements Filter { public static String getRequestedUrl(HttpServletRequest request) { String path = getRequestedPage(request); try { path = new URI(null, null, path, null).toASCIIString(); } catch (URISyntaxException e) { } String qs = request.getQueryString(); if (StringUtils.isNotEmpty(qs)) { if (qs.contains(CONVERSATION_ID)) { List<NameValuePair> list = URLEncodedUtils.parse(qs, UTF_8); if (list.removeIf(pair -> pair.getName().equals(CONVERSATION_ID))) { qs = URLEncodedUtils.format(list, UTF_8); } } if (!qs.isEmpty()) { path = path + '?' + qs; } } return path; }  @Override void destroy(); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); void doFilterInternal(ServletRequest request, ServletResponse response, FilterChain chain); NuxeoAuthenticationPlugin getAuthenticator(CachableUserIdentificationInfo ci); @Override void init(FilterConfig config); boolean saveRequestedURLBeforeRedirect(HttpServletRequest httpRequest, HttpServletResponse httpResponse); static String getRequestedUrl(HttpServletRequest request); static String getRequestedPage(ServletRequest request); static NuxeoLoginContext loginAs(String username); }
NuxeoAuthenticationFilter implements Filter { public static String getRequestedUrl(HttpServletRequest request) { String path = getRequestedPage(request); try { path = new URI(null, null, path, null).toASCIIString(); } catch (URISyntaxException e) { } String qs = request.getQueryString(); if (StringUtils.isNotEmpty(qs)) { if (qs.contains(CONVERSATION_ID)) { List<NameValuePair> list = URLEncodedUtils.parse(qs, UTF_8); if (list.removeIf(pair -> pair.getName().equals(CONVERSATION_ID))) { qs = URLEncodedUtils.format(list, UTF_8); } } if (!qs.isEmpty()) { path = path + '?' + qs; } } return path; }  @Override void destroy(); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); void doFilterInternal(ServletRequest request, ServletResponse response, FilterChain chain); NuxeoAuthenticationPlugin getAuthenticator(CachableUserIdentificationInfo ci); @Override void init(FilterConfig config); boolean saveRequestedURLBeforeRedirect(HttpServletRequest httpRequest, HttpServletResponse httpResponse); static String getRequestedUrl(HttpServletRequest request); static String getRequestedPage(ServletRequest request); static NuxeoLoginContext loginAs(String username); @Deprecated
    static final String DEFAULT_START_PAGE; static final String LOGIN_DOMAIN; }