Skip to content

JwtParserBuilder NestedCollection overrides #961

Open
@lhazlewood

Description

@lhazlewood

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 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions