@Test public void testSignature() { ByteBuf header = Jwt.signature(JWT); String s = header.toString(StandardCharsets.UTF_8); Assert.assertEquals( "bnQnr3F22X_LT1V8dpdDHFIIuh3KZGEEIFoY6d6TOopw6bjx197g5nS9CscW3vsWvmwVj0R-wURUg92csKh06qyRdVQ9kn8IuD_6duVnxsGF22i8KqunTlMuotLMe-k6-o16mYZcNiTyQYuWf1biySYB1TF-0n9t-w4gMGFADd8MlE18R9J0gjY0Nb3tWoK-sjVtwransviE9-lJzGop2kYPBW_GtHX86M1nUPHQzFSOY2EkB6oUpZK3pbJhi_FxwFNm6BwnObKkxo3xT-9FM2s9lW71-sPFCQ-E7hivzF0viHQn0kk-5xC80iwP0qcvJQ-2YlH84dANHPTzJiGhHQ", s); }
public static ByteBuf signature(ByteBuf token) { int index = ByteBufUtil.indexOf(token, token.readerIndex(), token.readableBytes(), JWT_SEPARATOR); index = ByteBufUtil.indexOf(token, index + 1, token.readableBytes(), JWT_SEPARATOR); return token.slice(index + 1, token.readableBytes() - index - 1); }
Jwt { public static ByteBuf signature(ByteBuf token) { int index = ByteBufUtil.indexOf(token, token.readerIndex(), token.readableBytes(), JWT_SEPARATOR); index = ByteBufUtil.indexOf(token, index + 1, token.readableBytes(), JWT_SEPARATOR); return token.slice(index + 1, token.readableBytes() - index - 1); } }
Jwt { public static ByteBuf signature(ByteBuf token) { int index = ByteBufUtil.indexOf(token, token.readerIndex(), token.readableBytes(), JWT_SEPARATOR); index = ByteBufUtil.indexOf(token, index + 1, token.readableBytes(), JWT_SEPARATOR); return token.slice(index + 1, token.readableBytes() - index - 1); }  }
Jwt { public static ByteBuf signature(ByteBuf token) { int index = ByteBufUtil.indexOf(token, token.readerIndex(), token.readableBytes(), JWT_SEPARATOR); index = ByteBufUtil.indexOf(token, index + 1, token.readableBytes(), JWT_SEPARATOR); return token.slice(index + 1, token.readableBytes() - index - 1); }  static ByteBuf header(ByteBuf token); static ByteBuf payload(ByteBuf token); static ByteBuf signature(ByteBuf token); static ByteBuf headerAndPayload(ByteBuf token); static boolean verifySHA256withRSA(PublicKey publicKey, ByteBuf token); static boolean verify(String alg, PublicKey publicKey, ByteBuf token); static long parseAccessKey(ByteBuf token, Set<String> mappedFields); static String parseAlgorithm(ByteBuf token); }
Jwt { public static ByteBuf signature(ByteBuf token) { int index = ByteBufUtil.indexOf(token, token.readerIndex(), token.readableBytes(), JWT_SEPARATOR); index = ByteBufUtil.indexOf(token, index + 1, token.readableBytes(), JWT_SEPARATOR); return token.slice(index + 1, token.readableBytes() - index - 1); }  static ByteBuf header(ByteBuf token); static ByteBuf payload(ByteBuf token); static ByteBuf signature(ByteBuf token); static ByteBuf headerAndPayload(ByteBuf token); static boolean verifySHA256withRSA(PublicKey publicKey, ByteBuf token); static boolean verify(String alg, PublicKey publicKey, ByteBuf token); static long parseAccessKey(ByteBuf token, Set<String> mappedFields); static String parseAlgorithm(ByteBuf token);  }