MCPcopy Index your code
hub / github.com/auth0/java-jwt / shouldGetId

Method shouldGetId

lib/src/test/java/com/auth0/jwt/JWTTest.java:320–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 5

requireMethod · 0.95
HMAC256Method · 0.95
verifyMethod · 0.65
buildMethod · 0.65
getIdMethod · 0.65

Tested by

no test coverage detected