-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Builder setters #794
Builder setters #794
Conversation
…efix) - Renamed Keys.forPassword to slightly cleaner/less verbose Keys.password - Ensured ClaimsMutator extends MapMutator - Ensured JwtBuilder verifyWith is overloaded and accepts only SecretKey and PublicKey instances - Ensured JwtBuilder decryptWith is overloaded and accepts only SecretKey and PrivateKey instances - Renamed JwtParserBuilder#enableUnsecuredJwts() to enableUnsecured() since any JWT or JWS without a header (or with an alg of none) are both considered 'unsecured', so the suffix was removed to avoid confusion.
…ter full replacement idiom confusion (as opposed to add/append)
…utation methods on the JwtBuilder are a little confusing. - Added JwtBuilder#claims() method that returns a Claims mutator with an and() method to get back to the JwtBuilder
…tyle name) - Added a new JwtBuilder#encoder to eventually replace the now-deprecated JwtBuilder#base64UrlEncodeWith method - Added a new JwtBuilder#serializer to eventually replace the now-deprecated JwtBuilder#serializeToJsonWith method
…decoder - Renamed JwtParserBuilder#jsonDeserializer to just JwtParserBuilder#deserializer - Lots of README.md updates to reflect builder api name changes
…upplier#key() - Renamed KeyPairBuilderSupplier#keyPairBuilder() to less verbose KeyPairBuilderSupplier#keyPair()
…ng/import conflict with io.jsonwebtoken.Header - Renamed JwtBuilder.Claims to JwtBuilder.BuilderClaims to avoid naming/import conflict with io.jsonwebtoken.Claims
- added generic DynamicJwkBuilder#keyPair(KeyPair) method - added generic DynamicJwkBuilder#chain method
… transition to 0.12.0, will remove in next release
The API changes made in jwtk/jjwt#794 were are not ported to GitHub API project. Until then, the new version cannot be used.
FYI this change caused considerable headaches for clients. Needing to replace calls to previously deprecated methods before updating to a new release is routine if irritating, but renaming an interface method makes it impossible to write code which works with both the older and newer versions of the library, leading to reflection as in hub4j/github-api#1727. It would be more polite to do #308 first so that |
Changed all old
set
* mutation methods to more modern builder-style methods: e.gsetSubject(String)
is nowsubject(String)
, etc.This had a better-than-expected impact on improving the readability and cleanliness of the API, making it less verbose, easier to read and more pleasant to work with.