예제 #1
0
  public void testAuth() throws Exception {

    AuthorizationRequest req =
        new AuthorizationRequest(
            "https://localhost/sqrl?4095c8adfa51dabe30fe9f9474d3f91def620300e489e6853baa67bed5d5e0d4");
    String testReuslt = req.getDomain();
    assertEquals("localhost", testReuslt);
    req.fullNut = false;
    assertEquals("https://localhost/sqrl", req.getReturnURL());
  }
예제 #2
0
  public void testAuth3_wqithsqrl_picky() throws Exception {

    AuthorizationRequest req =
        new AuthorizationRequest(
            "sqrl://example.com/sqrl?4095c8adfa51dabe30fe9f9474d3f91def620300e489e6853baa67bed5d5e0d4");
    String testReuslt = req.getDomain();
    assertEquals("example.com", testReuslt);
    // if we understand how to construct a sqrl then we should expect to understand how to handle
    // the protocol
    req.isConnectionPicky = true;
    req.fullNut = false;
    assertEquals("https://example.com/sqrl", req.getReturnURL());
  }