- changed status to resolved
Better API support for setting algorithm constraints to JwtConsumerBuilder
Issue #154
closed
As a developer I' like to have simpler API for adding algorithm constraints to JwtConsumerBuilder
. Current interface exposes internal implementation and is forcing to use AlgorithmConstraints
as parameter.
JwtConsumerBuilder builder = new JwtConsumerBuilder()
.setJwsAlgorithmConstraints(new AlgorithmConstraints(AlgorithmConstraints.ConstraintType.WHITELIST, AlgorithmIdentifiers.RSA_USING_SHA256))
Above code can be found in many places: https://www.programcreek.com/java-api-examples/?api=org.jose4j.jwt.consumer.JwtConsumerBuilder
One of proposition to make it simpler is to add additional method with the same parameters as in AlgorithmConstraints
constructor:
JwtConsumerBuilder builder = new JwtConsumerBuilder()
.setJwsAlgorithmConstraints(AlgorithmConstraints.ConstraintType.WHITELIST, AlgorithmIdentifiers.RSA_USING_SHA256)
Comments (3)
-
repo owner -
reporter Thank you.
-
repo owner - changed status to closed
released in jose4j-0.7.0 https://bitbucket.org/b_c/jose4j/wiki/Release%20Notes#!jose4j-070-january-17-2019
- Log in to comment
done with d122867