public interface CompressionCodecResolver
calg header, and if found, returns the corresponding CompressionCodec the parser
can use to decompress the JWT body.
JJWT's default JwtParser implementation supports both the
DEFLATE
and GZIP algorithms by default - you do not need to
specify a CompressionCodecResolver in these cases.
However, if you want to use a compression algorithm other than DEF or GZIP, you must implement
your own CompressionCodecResolver and specify that when
building and
parsing JWTs.
| 限定符和类型 | 方法和说明 |
|---|---|
CompressionCodec |
resolveCompressionCodec(Header header)
Looks for a JWT
calg header, and if found, returns the corresponding CompressionCodec the parser
can use to decompress the JWT body. |
CompressionCodec resolveCompressionCodec(Header header) throws CompressionException
calg header, and if found, returns the corresponding CompressionCodec the parser
can use to decompress the JWT body.header - of the JWTcalg header, or null if there is no calg header.CompressionException - if a calg header value is found and not supported.