@Test public void testGetSessionHash() { String routeHash = md5Hex("hubAddress".getBytes(StandardCharsets.UTF_8)); assertThat(getSessionHash(sessionRequest(routeHash, randomUUID().toString(), "")), is(equalTo(routeHash))); assertThat(getSessionHash(sessionRequest(routeHash, randomUUID().toString(), "dhgdhg")), is(equalTo(routeHash))); assertThat(getSessionHash(sessionRequest(routeHash, randomUUID().toString(), "dh/gdh/")), is(equalTo(routeHash))); assertThat(getSessionHash(sessionRequest(routeHash, randomUUID().toString(), "dh/gdh/g")), is(equalTo(routeHash))); }
public static String getSessionHash(String uri) { return uri.substring(WD_HUB_SESSION.length(), getUriPrefixLength()); }
JsonWireUtils { public static String getSessionHash(String uri) { return uri.substring(WD_HUB_SESSION.length(), getUriPrefixLength()); } }
JsonWireUtils { public static String getSessionHash(String uri) { return uri.substring(WD_HUB_SESSION.length(), getUriPrefixLength()); } private  JsonWireUtils(); }
JsonWireUtils { public static String getSessionHash(String uri) { return uri.substring(WD_HUB_SESSION.length(), getUriPrefixLength()); } private  JsonWireUtils(); static boolean isUriValid(String uri); static boolean isSessionDeleteRequest(HttpServletRequest request, String command); static String getSessionHash(String uri); static String getFullSessionId(String uri); static int getUriPrefixLength(); static String redirectionUrl(String host, String command); static String getCommand(String uri); }
JsonWireUtils { public static String getSessionHash(String uri) { return uri.substring(WD_HUB_SESSION.length(), getUriPrefixLength()); } private  JsonWireUtils(); static boolean isUriValid(String uri); static boolean isSessionDeleteRequest(HttpServletRequest request, String command); static String getSessionHash(String uri); static String getFullSessionId(String uri); static int getUriPrefixLength(); static String redirectionUrl(String host, String command); static String getCommand(String uri); static final String WD_HUB_SESSION; static final int SESSION_HASH_LENGTH; }