public class DefaultCompressionCodecResolver extends java.lang.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| 构造器和说明 |
|---|
DefaultCompressionCodecResolver() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 CompressionCodecResolverheader - of the JWTcalg header, or null if there is no calg header.