mirror of https://github.com/jwtk/jjwt.git
Removes eager initialization of the CompressionCodecResolver in the JwtParserBuilder
This removes a potential service loader issue with OSGi runtimes. Fixes: #578
This commit is contained in:
parent
dc120e8c54
commit
901048aeac
|
@ -55,7 +55,7 @@ public class DefaultJwtParserBuilder implements JwtParserBuilder {
|
||||||
|
|
||||||
private SigningKeyResolver signingKeyResolver;
|
private SigningKeyResolver signingKeyResolver;
|
||||||
|
|
||||||
private CompressionCodecResolver compressionCodecResolver = new DefaultCompressionCodecResolver();
|
private CompressionCodecResolver compressionCodecResolver;
|
||||||
|
|
||||||
private Decoder<String, byte[]> base64UrlDecoder = Decoders.BASE64URL;
|
private Decoder<String, byte[]> base64UrlDecoder = Decoders.BASE64URL;
|
||||||
|
|
||||||
|
@ -191,6 +191,11 @@ public class DefaultJwtParserBuilder implements JwtParserBuilder {
|
||||||
this.deserializer = Services.loadFirst(Deserializer.class);
|
this.deserializer = Services.loadFirst(Deserializer.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the compressionCodecResolver is not set default it.
|
||||||
|
if (this.compressionCodecResolver == null) {
|
||||||
|
this.compressionCodecResolver = new DefaultCompressionCodecResolver();
|
||||||
|
}
|
||||||
|
|
||||||
return new ImmutableJwtParser(
|
return new ImmutableJwtParser(
|
||||||
new DefaultJwtParser(signingKeyResolver,
|
new DefaultJwtParser(signingKeyResolver,
|
||||||
key,
|
key,
|
||||||
|
|
Loading…
Reference in New Issue