Sign JWTs with a Key
ProprietaryReplaces JwtBuilder#signWith(SignatureAlgorithm, ..), deprecated since JJWT 0.10, with signWith(Key, SignatureAlgorithm). A String secret is Base64 decoded and a byte[] secret is used as an HMAC-SHA key with Keys.hmacShaKeyFor(..), as before. As 0.10 rejects keys that are shorter than the algorithm requires, and Strings that aren't strictly Base64 encoded, these keys are marked with a warning, unless they're constants that pass these checks.
org. openrewrite. java. security. jjwt. UseKeyForSignWithmod run . --recipe= org. openrewrite. java. security. jjwt. UseKeyForSignWithInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.