@Test public void testSecureClickRawAuthenticationResponse() { String secureClickResponseHex = "01010000 001a3044 0220652a 4248527f 805a6203 a903e820 20d9d871 3966614b f41b93c9 02c83a9f c56f0220 230283f9 8305f889 d379278b 5fde2e2f d3e68182 08dfff75 3e218b74 a6e56306"; byte[] secureClickResponseBytes = Hex.decode(secureClickResponseHex); String u2fResponseBase64 = Base64Util.base64urlencode(secureClickResponseBytes); RawAuthenticateResponse rawAuthenticateResponse = rawAuthenticationService.parseRawAuthenticateResponse(u2fResponseBase64); assertNotNull(rawAuthenticateResponse); }
public RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64) { ByteDataInputStream bis = new ByteDataInputStream(Base64Util.base64urldecode(rawDataBase64)); try { return new RawAuthenticateResponse(bis.readSigned(), bis.readInt(), bis.readAll()); } catch (IOException ex) { throw new BadInputException("Failed to parse RAW authenticate response", ex); } finally { IOUtils.closeQuietly(bis); } }
RawAuthenticationService { public RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64) { ByteDataInputStream bis = new ByteDataInputStream(Base64Util.base64urldecode(rawDataBase64)); try { return new RawAuthenticateResponse(bis.readSigned(), bis.readInt(), bis.readAll()); } catch (IOException ex) { throw new BadInputException("Failed to parse RAW authenticate response", ex); } finally { IOUtils.closeQuietly(bis); } } }
RawAuthenticationService { public RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64) { ByteDataInputStream bis = new ByteDataInputStream(Base64Util.base64urldecode(rawDataBase64)); try { return new RawAuthenticateResponse(bis.readSigned(), bis.readInt(), bis.readAll()); } catch (IOException ex) { throw new BadInputException("Failed to parse RAW authenticate response", ex); } finally { IOUtils.closeQuietly(bis); } }  }
RawAuthenticationService { public RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64) { ByteDataInputStream bis = new ByteDataInputStream(Base64Util.base64urldecode(rawDataBase64)); try { return new RawAuthenticateResponse(bis.readSigned(), bis.readInt(), bis.readAll()); } catch (IOException ex) { throw new BadInputException("Failed to parse RAW authenticate response", ex); } finally { IOUtils.closeQuietly(bis); } }  RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64); void checkSignature(String appId, ClientData clientData, RawAuthenticateResponse rawAuthenticateResponse, byte[] publicKey); }
RawAuthenticationService { public RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64) { ByteDataInputStream bis = new ByteDataInputStream(Base64Util.base64urldecode(rawDataBase64)); try { return new RawAuthenticateResponse(bis.readSigned(), bis.readInt(), bis.readAll()); } catch (IOException ex) { throw new BadInputException("Failed to parse RAW authenticate response", ex); } finally { IOUtils.closeQuietly(bis); } }  RawAuthenticateResponse parseRawAuthenticateResponse(String rawDataBase64); void checkSignature(String appId, ClientData clientData, RawAuthenticateResponse rawAuthenticateResponse, byte[] publicKey); static final String AUTHENTICATE_GET_TYPE; static final String AUTHENTICATE_CANCEL_TYPE; static final String[] SUPPORTED_AUTHENTICATE_TYPES; }