JwtParser `parse` method name changes
lhazlewood opened this issue · 0 comments
lhazlewood commented
Creating this issue per the discussion in #658
Since parsing unprotected JWTs is not possible by default (RFCs mandate disabling this behavior by default), and can only be supported by configuring the JwtParserBuilder
in master
(via the enableUnsecured()
builder method), unexpected parse
method invocations are still protected/secure by default.
To that end, this issue represents a name change purely in the name of convenience and self-documentation. It is to change the various parse
* methods from parseClaimsJws
, parseClaimsJwt
, etc (which might not be easy to distinguish visually and easily chosen incorrectly) to something more readable/explicit and less likely to be chosen mistakenly. For example:
Jwt<Claims> parseUnprotectedClaims(String jwt);
Jwt<byte[]> parseUnprotectedContent(String jwt);
Jws<Claims> parseSignedClaims(String jwt);
Jws<byte[]> parseSignedContent(String jwt);
Jwe<Claims> parseEncryptedClaims(String jwt);
Jwe<byte[]> parseEncryptedContent(String jwt);