public class DefaultCompressionCodecResolver extends Object implements CompressionCodecResolver
CompressionCodecResolver that supports the following:
Header does not have a calg header, this implementation does
nothing and returns null to the caller, indicating no compression was used.calg value of DEF, a DeflateCompressionCodec will be returned.calg value of GZIP, a GzipCompressionCodec will be returned.calg value, a CompressionException is thrown to reflect an
unrecognized algorithm.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.
DeflateCompressionCodec,
GzipCompressionCodec| Constructor and Description |
|---|
DefaultCompressionCodecResolver() |
| Modifier and Type | Method and Description |
|---|---|
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. |
public CompressionCodec resolveCompressionCodec(Header header)
CompressionCodecResolvercalg header, and if found, returns the corresponding CompressionCodec the parser
can use to decompress the JWT body.resolveCompressionCodec in interface CompressionCodecResolverheader - of the JWTcalg header, or null if there is no calg header.Copyright © 2017. All rights reserved.