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

Method shouldGetArrayAudience

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

Source from the content-addressed store, hash-verified

245 }
246
247 @Test
248 public void shouldGetArrayAudience() {
249 String token = "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOlsiSG9wZSIsIlRyYXZpcyIsIlNvbG9tb24iXX0.Tm4W8WnfPjlmHSmKFakdij0on2rWPETpoM7Sh0u6-S4";
250 DecodedJWT jwt = JWT.require(Algorithm.HMAC256("secret"))
251 .build()
252 .verify(token);
253
254 assertThat(jwt, is(notNullValue()));
255 assertThat(jwt.getAudience(), is(IsCollectionWithSize.hasSize(3)));
256 assertThat(jwt.getAudience(), is(IsIterableContaining.hasItems("Hope", "Travis", "Solomon")));
257 }
258
259 @Test
260 public void shouldGetStringAudience() {

Callers

nothing calls this directly

Calls 5

requireMethod · 0.95
HMAC256Method · 0.95
verifyMethod · 0.65
buildMethod · 0.65
getAudienceMethod · 0.65

Tested by

no test coverage detected