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

Method shouldGetAlgorithm

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

Source from the content-addressed store, hash-verified

201 // Standard Claims
202
203 @Test
204 public void shouldGetAlgorithm() {
205 String token = "eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ";
206 DecodedJWT jwt = JWT.require(Algorithm.HMAC256("secret"))
207 .build()
208 .verify(token);
209
210 assertThat(jwt, is(notNullValue()));
211 assertThat(jwt.getAlgorithm(), is("HS256"));
212 }
213
214 @Test
215 public void shouldGetSignature() {

Callers

nothing calls this directly

Calls 5

requireMethod · 0.95
HMAC256Method · 0.95
verifyMethod · 0.65
buildMethod · 0.65
getAlgorithmMethod · 0.65

Tested by

no test coverage detected