()
| 318 | } |
| 319 | |
| 320 | @Test |
| 321 | public void shouldGetId() { |
| 322 | String token = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxMjM0NTY3ODkwIn0.m3zgEfVUFOd-CvL3xG5BuOWLzb0zMQZCqiVNQQOPOvA"; |
| 323 | JWTVerifier.BaseVerification verification = (JWTVerifier.BaseVerification) JWT.require(Algorithm.HMAC256("secret")); |
| 324 | DecodedJWT jwt = verification |
| 325 | .build() |
| 326 | .verify(token); |
| 327 | |
| 328 | assertThat(jwt, is(notNullValue())); |
| 329 | assertThat(jwt.getId(), is("1234567890")); |
| 330 | } |
| 331 | |
| 332 | @Test |
| 333 | public void shouldGetContentType() { |