From 5c6dec061ff99ef7122a33960ada95e496a37087 Mon Sep 17 00:00:00 2001 From: Les Hazlewood <121180+lhazlewood@users.noreply.github.com> Date: Sun, 28 Jan 2024 15:13:27 -0800 Subject: [PATCH 1/3] - Adding 0.12.4 release version references - Adding CI 'workflow_dispatch' event trigger - Changed git url from ssh to https --- .github/workflows/ci.yml | 1 + README.md | 26 +++++++++---------- .../jackson/io/JacksonDeserializerTest.groovy | 1 + .../impl/DelegatingClaimsMutator.java | 4 +-- .../io/jsonwebtoken/impl/lang/Services.java | 1 + .../impl/security/AesAlgorithm.java | 5 ++++ .../security/AbstractEcJwkFactoryTest.groovy | 1 + .../security/Pbes2HsAkwAlgorithmTest.groovy | 3 +++ .../impl/security/SecretJwkFactoryTest.groovy | 4 +++ pom.xml | 4 +-- 10 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 488dd5ed7..4e83275dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: CI on: + workflow_dispatch: pull_request: # all pull requests push: branches: diff --git a/README.md b/README.md index 374ea0b18..794f95b5c 100644 --- a/README.md +++ b/README.md @@ -543,18 +543,18 @@ If you're building a (non-Android) JDK project, you will want to define the foll io.jsonwebtoken jjwt-api - 0.12.3 + 0.12.4 io.jsonwebtoken jjwt-impl - 0.12.3 + 0.12.4 runtime io.jsonwebtoken jjwt-jackson - 0.12.3 + 0.12.4 runtime ``` @@ -3049,7 +3049,7 @@ scope which is the typical JJWT default). That is: ```groovy dependencies { - implementation 'io.jsonwebtoken:jjwt-jackson:0.12.3' + implementation 'io.jsonwebtoken:jjwt-jackson:0.12.4' } ``` @@ -3157,7 +3157,7 @@ scope which is the typical JJWT default). That is: io.jsonwebtoken jjwt-gson - 0.12.3 + 0.12.4 compile ``` @@ -3166,7 +3166,7 @@ scope which is the typical JJWT default). That is: ```groovy dependencies { - implementation 'io.jsonwebtoken:jjwt-gson:0.12.3' + implementation 'io.jsonwebtoken:jjwt-gson:0.12.4' } ``` diff --git a/extensions/jackson/src/test/groovy/io/jsonwebtoken/jackson/io/JacksonDeserializerTest.groovy b/extensions/jackson/src/test/groovy/io/jsonwebtoken/jackson/io/JacksonDeserializerTest.groovy index 2363057de..b21667441 100644 --- a/extensions/jackson/src/test/groovy/io/jsonwebtoken/jackson/io/JacksonDeserializerTest.groovy +++ b/extensions/jackson/src/test/groovy/io/jsonwebtoken/jackson/io/JacksonDeserializerTest.groovy @@ -123,6 +123,7 @@ class JacksonDeserializerTest { /** * Asserts https://github.com/jwtk/jjwt/issues/877 + * @since 0.12.4 */ @Test void testStrictDuplicateDetection() { diff --git a/impl/src/main/java/io/jsonwebtoken/impl/DelegatingClaimsMutator.java b/impl/src/main/java/io/jsonwebtoken/impl/DelegatingClaimsMutator.java index 7740fe275..9c408a154 100644 --- a/impl/src/main/java/io/jsonwebtoken/impl/DelegatingClaimsMutator.java +++ b/impl/src/main/java/io/jsonwebtoken/impl/DelegatingClaimsMutator.java @@ -47,7 +47,7 @@ T put(Parameter param, F value) { return self(); } - @Override + @Override // override starting in 0.12.4 public Object put(String key, Object value) { if (AUDIENCE_STRING.getId().equals(key)) { // https://github.com/jwtk/jjwt/issues/890 if (value instanceof String) { @@ -63,7 +63,7 @@ public Object put(String key, Object value) { return super.put(key, value); } - @Override + @Override // overridden starting in 0.12.4 public void putAll(Map m) { if (m == null) return; for (Map.Entry entry : m.entrySet()) { diff --git a/impl/src/main/java/io/jsonwebtoken/impl/lang/Services.java b/impl/src/main/java/io/jsonwebtoken/impl/lang/Services.java index 6125ebc09..f0c056699 100644 --- a/impl/src/main/java/io/jsonwebtoken/impl/lang/Services.java +++ b/impl/src/main/java/io/jsonwebtoken/impl/lang/Services.java @@ -65,6 +65,7 @@ private Services() { * @param The type of the SPI * @return The first available instance of the service. * @throws UnavailableImplementationException When no implementation of the SPI class can be found. + * @since 0.12.4 */ public static T get(Class spi) { // TODO: JDK8, replace this find/putIfAbsent logic with ConcurrentMap.computeIfAbsent diff --git a/impl/src/main/java/io/jsonwebtoken/impl/security/AesAlgorithm.java b/impl/src/main/java/io/jsonwebtoken/impl/security/AesAlgorithm.java index a7d68117a..32355571f 100644 --- a/impl/src/main/java/io/jsonwebtoken/impl/security/AesAlgorithm.java +++ b/impl/src/main/java/io/jsonwebtoken/impl/security/AesAlgorithm.java @@ -55,6 +55,11 @@ abstract class AesAlgorithm extends CryptoAlgorithm implements KeyBuilderSupplie protected final int tagBitLength; protected final boolean gcm; + /** + * Ensures {@code keyBitLength is a valid AES key length} + * @param keyBitLength the key length (in bits) to check + * @since 0.12.4 + */ static void assertKeyBitLength(int keyBitLength) { if (keyBitLength == 128 || keyBitLength == 192 || keyBitLength == 256) return; // valid String msg = "Invalid AES key length: " + Bytes.bitsMsg(keyBitLength) + ". AES only supports " + diff --git a/impl/src/test/groovy/io/jsonwebtoken/impl/security/AbstractEcJwkFactoryTest.groovy b/impl/src/test/groovy/io/jsonwebtoken/impl/security/AbstractEcJwkFactoryTest.groovy index fbbd144db..e11e0e842 100644 --- a/impl/src/test/groovy/io/jsonwebtoken/impl/security/AbstractEcJwkFactoryTest.groovy +++ b/impl/src/test/groovy/io/jsonwebtoken/impl/security/AbstractEcJwkFactoryTest.groovy @@ -44,6 +44,7 @@ class AbstractEcJwkFactoryTest { /** * Asserts correct behavior per https://github.com/jwtk/jjwt/issues/901 + * @since 0.12.4 */ @Test void fieldElementByteArrayLength() { diff --git a/impl/src/test/groovy/io/jsonwebtoken/impl/security/Pbes2HsAkwAlgorithmTest.groovy b/impl/src/test/groovy/io/jsonwebtoken/impl/security/Pbes2HsAkwAlgorithmTest.groovy index 36142646e..242308bf3 100644 --- a/impl/src/test/groovy/io/jsonwebtoken/impl/security/Pbes2HsAkwAlgorithmTest.groovy +++ b/impl/src/test/groovy/io/jsonwebtoken/impl/security/Pbes2HsAkwAlgorithmTest.groovy @@ -53,6 +53,9 @@ class Pbes2HsAkwAlgorithmTest { } } + /** + * @since 0.12.4 + */ @Test void testExceedsMaxIterations() { for (Pbes2HsAkwAlgorithm alg : ALGS) { diff --git a/impl/src/test/groovy/io/jsonwebtoken/impl/security/SecretJwkFactoryTest.groovy b/impl/src/test/groovy/io/jsonwebtoken/impl/security/SecretJwkFactoryTest.groovy index 6af9c1384..4eeb81062 100644 --- a/impl/src/test/groovy/io/jsonwebtoken/impl/security/SecretJwkFactoryTest.groovy +++ b/impl/src/test/groovy/io/jsonwebtoken/impl/security/SecretJwkFactoryTest.groovy @@ -131,6 +131,9 @@ class SecretJwkFactoryTest { assertEquals 'AES', result.toKey().getAlgorithm() } + /** + * @since 0.12.4 + */ @Test // 'oct' type, but 'alg' value is not a secret key algorithm (and therefore malformed) void testMismatchedAlgorithm() { @@ -176,6 +179,7 @@ class SecretJwkFactoryTest { * * This test asserts this allowed behavior per https://github.com/jwtk/jjwt/issues/905 * @see JJWT Issue 905 + * @since 0.12.4 */ @Test void testAllowedKeyLengths() { diff --git a/pom.xml b/pom.xml index 69e29a101..715a55458 100644 --- a/pom.xml +++ b/pom.xml @@ -50,8 +50,8 @@ scm:git:https://github.com/jwtk/jjwt.git - scm:git:git@github.com:jwtk/jjwt.git - git@github.com:jwtk/jjwt.git + scm:git:https://github.com/jwtk/jjwt.git + https://github.com/jwtk/jjwt.git HEAD From bf4168cdceb85435b17d912a2087960ae597d37f Mon Sep 17 00:00:00 2001 From: Les Hazlewood <121180+lhazlewood@users.noreply.github.com> Date: Sun, 28 Jan 2024 16:28:04 -0800 Subject: [PATCH 2/3] [maven-release-plugin] prepare release 0.12.4 --- api/pom.xml | 2 +- extensions/gson/pom.xml | 2 +- extensions/jackson/pom.xml | 2 +- extensions/orgjson/pom.xml | 2 +- extensions/pom.xml | 2 +- impl/pom.xml | 2 +- pom.xml | 4 ++-- tdjar/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 80a49db9b..5f10cdddc 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../pom.xml diff --git a/extensions/gson/pom.xml b/extensions/gson/pom.xml index fb17afece..928e92f47 100644 --- a/extensions/gson/pom.xml +++ b/extensions/gson/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../../pom.xml diff --git a/extensions/jackson/pom.xml b/extensions/jackson/pom.xml index 658ebd679..5fa33de88 100644 --- a/extensions/jackson/pom.xml +++ b/extensions/jackson/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../../pom.xml diff --git a/extensions/orgjson/pom.xml b/extensions/orgjson/pom.xml index 0936fe406..2bbc79bfb 100644 --- a/extensions/orgjson/pom.xml +++ b/extensions/orgjson/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../../pom.xml diff --git a/extensions/pom.xml b/extensions/pom.xml index e04955207..1c875d008 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../pom.xml diff --git a/impl/pom.xml b/impl/pom.xml index bb7fb61aa..b25585b69 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../pom.xml diff --git a/pom.xml b/pom.xml index 715a55458..264d4362b 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 JJWT JSON Web Token support for the JVM and Android pom @@ -52,7 +52,7 @@ scm:git:https://github.com/jwtk/jjwt.git scm:git:https://github.com/jwtk/jjwt.git https://github.com/jwtk/jjwt.git - HEAD + 0.12.4 GitHub Issues diff --git a/tdjar/pom.xml b/tdjar/pom.xml index 52cbbc2af..42b26b966 100644 --- a/tdjar/pom.xml +++ b/tdjar/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4-SNAPSHOT + 0.12.4 ../pom.xml From 06fe85a685d8d357b6126bc41e8b0cb47755af79 Mon Sep 17 00:00:00 2001 From: Les Hazlewood <121180+lhazlewood@users.noreply.github.com> Date: Sun, 28 Jan 2024 16:28:07 -0800 Subject: [PATCH 3/3] [maven-release-plugin] prepare for next development iteration --- api/pom.xml | 2 +- extensions/gson/pom.xml | 2 +- extensions/jackson/pom.xml | 2 +- extensions/orgjson/pom.xml | 2 +- extensions/pom.xml | 2 +- impl/pom.xml | 2 +- pom.xml | 4 ++-- tdjar/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 5f10cdddc..6ee645b6d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../pom.xml diff --git a/extensions/gson/pom.xml b/extensions/gson/pom.xml index 928e92f47..4b3a296ef 100644 --- a/extensions/gson/pom.xml +++ b/extensions/gson/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../../pom.xml diff --git a/extensions/jackson/pom.xml b/extensions/jackson/pom.xml index 5fa33de88..00f09665d 100644 --- a/extensions/jackson/pom.xml +++ b/extensions/jackson/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../../pom.xml diff --git a/extensions/orgjson/pom.xml b/extensions/orgjson/pom.xml index 2bbc79bfb..f37fe1b04 100644 --- a/extensions/orgjson/pom.xml +++ b/extensions/orgjson/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../../pom.xml diff --git a/extensions/pom.xml b/extensions/pom.xml index 1c875d008..0ee8810ba 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../pom.xml diff --git a/impl/pom.xml b/impl/pom.xml index b25585b69..7c1f137d8 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 264d4362b..a49bb2a1f 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT JJWT JSON Web Token support for the JVM and Android pom @@ -52,7 +52,7 @@ scm:git:https://github.com/jwtk/jjwt.git scm:git:https://github.com/jwtk/jjwt.git https://github.com/jwtk/jjwt.git - 0.12.4 + HEAD GitHub Issues diff --git a/tdjar/pom.xml b/tdjar/pom.xml index 42b26b966..c22c9c559 100644 --- a/tdjar/pom.xml +++ b/tdjar/pom.xml @@ -21,7 +21,7 @@ io.jsonwebtoken jjwt-root - 0.12.4 + 0.12.5-SNAPSHOT ../pom.xml