We should consider introducing public JoseHeader getJoseHeader() and public JwtClaimsSet getJwtClaimsSet() and potentially deprecating Map<String, Object> getHeaders() and public Map<String, Object> getClaims().
Comment From: jgrandja
The proposal to replace public Map<String, Object> getClaims() with public JwtClaimsSet getJwtClaimsSet() won't work because getClaims() cannot be deprecated (and eventually removed) as it must be implemented as part of the ClaimAccessor contract via Jwt implements JwtClaimAccessor.
Furthermore, making use of JoseHeader and JwtClaimsSet doesn't provide enough value beyond stronger typing to justify the work involved and the various deprecations required to integrate these classes.