Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Algorithm Request/Result Builders #940

Open
lhazlewood opened this issue Apr 30, 2024 Discussed in #929 · 0 comments
Open

Algorithm Request/Result Builders #940

lhazlewood opened this issue Apr 30, 2024 Discussed in #929 · 0 comments
Milestone

Comments

@lhazlewood
Copy link
Contributor

As discussed in #929, this issue represents the work to make available Request and Result builders in the JJWT api module for use when calling various JJWT Algorithm instances (e.g. SignatureAlgorithm, KeyAlgorithm, etc). For example:

var alg = Jwts.SIG.RS256;
var request = alg.request(publicKey).data(concatSignedFields).digest(decodedSignature).build();
var signature = alg.digest(request);

The primary purpose of this work is to allow simple builder-based construction of concrete instances of the Request and Result interfaces so Algorithm implementors no longer need to:

  1. implement those interfaces directly, which is especially helpful when writing unit tests), nor
  2. create a compile-time dependency on the impl module.

cc @mrts

@lhazlewood lhazlewood added this to the 0.13.0 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant