Declare HMAC keys as SecretKey
ProprietaryChanges the declared type of local variables, private fields and methods from java.security.Key to javax.crypto.SecretKey when every value they hold or return is a SecretKey, e.g. Key key = Keys.hmacShaKeyFor(bytes). JJWT 0.12 only accepts a SecretKey (or a PublicKey) in JwtParserBuilder#verifyWith and in JwtBuilder#signWith(key, Jwts.SIG.HS256).
org. openrewrite. java. security. jjwt. UseSecretKeyTypemod run . --recipe= org. openrewrite. java. security. jjwt. UseSecretKeyTypeInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.