@Test public void shouldCanonicalizeOrigin() throws U2fBadInputException { assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("https: assertEquals("https: assertEquals("android:apk-key-hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk", canonicalizeOrigin("android:apk-key-hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk")); }
public static String canonicalizeOrigin(String url) { try { URI uri = new URI(url); if (uri.getAuthority() == null) { return url; } return uri.getScheme() + ": } catch (URISyntaxException e) { throw new IllegalArgumentException("specified bad origin", e); } }
ClientData { public static String canonicalizeOrigin(String url) { try { URI uri = new URI(url); if (uri.getAuthority() == null) { return url; } return uri.getScheme() + ": } catch (URISyntaxException e) { throw new IllegalArgumentException("specified bad origin", e); } } }
ClientData { public static String canonicalizeOrigin(String url) { try { URI uri = new URI(url); if (uri.getAuthority() == null) { return url; } return uri.getScheme() + ": } catch (URISyntaxException e) { throw new IllegalArgumentException("specified bad origin", e); } } ClientData(String clientData); }
ClientData { public static String canonicalizeOrigin(String url) { try { URI uri = new URI(url); if (uri.getAuthority() == null) { return url; } return uri.getScheme() + ": } catch (URISyntaxException e) { throw new IllegalArgumentException("specified bad origin", e); } } ClientData(String clientData); String asJson(); @Override String toString(); String getChallenge(); void checkContent(String type, String challenge, Optional<Set<String>> facets); static Set<String> canonicalizeOrigins(Set<String> origins); static String canonicalizeOrigin(String url); }
ClientData { public static String canonicalizeOrigin(String url) { try { URI uri = new URI(url); if (uri.getAuthority() == null) { return url; } return uri.getScheme() + ": } catch (URISyntaxException e) { throw new IllegalArgumentException("specified bad origin", e); } } ClientData(String clientData); String asJson(); @Override String toString(); String getChallenge(); void checkContent(String type, String challenge, Optional<Set<String>> facets); static Set<String> canonicalizeOrigins(Set<String> origins); static String canonicalizeOrigin(String url);  }