public interface CompressionCodecResolver
zip
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.
Modifier and Type | Method and Description |
---|---|
CompressionCodec |
resolveCompressionCodec(Header header)
Looks for a JWT
zip header, and if found, returns the corresponding CompressionCodec the parser
can use to decompress the JWT body. |
CompressionCodec resolveCompressionCodec(Header header) throws CompressionException
zip
header, and if found, returns the corresponding CompressionCodec
the parser
can use to decompress the JWT body.header
- of the JWTzip
header, or null if there is no zip
header.CompressionException
- if a zip
header value is found and not supported.Copyright © 2014–2020 jsonwebtoken.io. All rights reserved.