By using ServiceLoader the hardcoded dependency of implementation classes becomes obsolete, so that the API will be truly independent from the implementation. Also this approach paves the way for migration to JPMS modules, as these also leverage the ServiceLoader API.
Use ServiceLoader instead of reflection to resolve CompressionCodec implementation classes.
Isolate key- and key-pair generators and use ServiceLoader instead of reflection to invert dependencies.
Move FactoryLoader logic to Services class and improve package layout.
Resolve Deserializer using the ServiceLoader instead of reflection and hardcoded reference.
Resolve Serializer using the ServiceLoader instead of reflection and hardcoded reference.
- Added new JwtParserBuilder
- Copied mutator methods from JwtParser into new JwtParserBuilder
- Marked said methods as deprecated in JwtParser
- Copied JwtParserTest and JwtsTest to Deprecated*, as to retain coverage on methods that will be removed in 1.0
- Added ImmutableJwtParser
This is a stop gap until 1.0, all of the mutable methods will now throw a IllegalStateException.
NOTE: this only comes into place when using the new Jwts.parserBuilder(), Jwts.parser() is unchanged.
Fixes: #473
- Adds new constructor JacksonDeserializer(Map<String, Class> claimTypeMap), which will enable later calls Claims.get("key", CustomType.class) to work as expectd
- Adds new Maps utility class to make map creation fluent
Fixes: #369
There were a couple issues preventing running the build with Java 11
- A groovy bug - fixed with a version bump https://issues.apache.org/jira/browse/GROOVY-8727
- The ASM version that is embedded in easymock does NOT support Java 11 classes - worked around by stubbing out those usages instead
- javadoc modules issue - fixed by setting the Javadoc source version to 1.7
- Made some tests more deterministic with mocks instead of relying on Random number generator - BigInteger values were non-deterministic because of a random leading sign bit being there (or not) during test runs.
Resolves#366