mirror of
https://github.com/jwtk/jjwt.git
synced 2025-02-28 01:29:05 +00:00
Added in test that does NOT work for custom claim with Date type.
This commit is contained in:
parent
2e452a42b1
commit
b4015be11e
@ -1327,4 +1327,21 @@ class JwtParserTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Test
|
||||||
|
// void testParseExpectedCustomDate_Success() {
|
||||||
|
// def aDate = new Date(System.currentTimeMillis())
|
||||||
|
//
|
||||||
|
// byte[] key = randomKey()
|
||||||
|
//
|
||||||
|
// String compact = Jwts.builder().signWith(SignatureAlgorithm.HS256, key).
|
||||||
|
// claim("aDate", aDate).
|
||||||
|
// compact()
|
||||||
|
//
|
||||||
|
// Jwt<Header,Claims> jwt = Jwts.parser().setSigningKey(key).
|
||||||
|
// expect("aDate", aDate).
|
||||||
|
// parseClaimsJws(compact)
|
||||||
|
//
|
||||||
|
// assertEquals jwt.getBody().get("aDate"), aDate
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user