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

Method shouldGetSubject

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

Source from the content-addressed store, hash-verified

234 }
235
236 @Test
237 public void shouldGetSubject() {
238 String token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUb2szbnMifQ.RudAxkslimoOY3BLl2Ghny3BrUKu9I1ZrXzCZGDJtNs";
239 DecodedJWT jwt = JWT.require(Algorithm.HMAC256("secret"))
240 .build()
241 .verify(token);
242
243 assertThat(jwt, is(notNullValue()));
244 assertThat(jwt.getSubject(), is("Tok3ns"));
245 }
246
247 @Test
248 public void shouldGetArrayAudience() {

Callers

nothing calls this directly

Calls 5

requireMethod · 0.95
HMAC256Method · 0.95
verifyMethod · 0.65
buildMethod · 0.65
getSubjectMethod · 0.65

Tested by

no test coverage detected