Open
Description
Per #521 (comment), a nested collection .add
call will not currently replace an existing algorithm with the same identifer (as the JavaDoc says it should). This issue represents the work to ensure this behavior works as documented.
For those needing this behavior, until this issue is fixed, the current workaround is to explicitly call .remove
before calling .add
:
var alg = new MyCustomAlgorithm();
Jwts.parser().sig()
.remove(alg) // <-- 1.
.add(alg) // <-- 2.
.and()// ... etc ...