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] - 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 extends String, ?> m) {
if (m == null) return;
for (Map.Entry extends String, ?> 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