This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-connectors.git
The following commit(s) were added to refs/heads/main by this push:
new 856e8cdc4 Update jwt-json-common to 12.0.0 (#2011)
856e8cdc4 is described below
commit 856e8cdc44ade3621a337b0584cd2121e98d01dc
Author: Scala Steward <[email protected]>
AuthorDate: Fri Oct 23 15:26:26 2026 +0200
Update jwt-json-common to 12.0.0 (#2011)
* Update jwt-json-common to 12.0.0
* fix: implement new JwtJsonCommon JWK methods for jwt-scala 12.0.0
Motivation:
jwt-json-common 12.0.0 adds abstract parseJwk and parseJwkSet methods
to JwtJsonCommon, so google-common no longer compiles.
Modification:
Implement both in JwtSprayJson by throwing UnsupportedOperationException.
pekko-connectors only uses JwtSprayJson to encode Google service account
tokens and never parses JWKs.
Result:
google-common compiles against jwt-json-common 12.0.0.
Tests:
- sbt google-common/Test/compile google-common/scalafmtCheck: passed
- sbt "google-common/testOnly *GoogleOAuth2*": 1 passed
References:
Refs #2011
---------
Co-authored-by: PJ Fanning <[email protected]>
---
.../apache/pekko/stream/connectors/google/jwt/JwtSprayJson.scala | 7 +++++++
project/Dependencies.scala | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git
a/google-common/src/main/scala/org/apache/pekko/stream/connectors/google/jwt/JwtSprayJson.scala
b/google-common/src/main/scala/org/apache/pekko/stream/connectors/google/jwt/JwtSprayJson.scala
index d07b213b3..9090654ab 100644
---
a/google-common/src/main/scala/org/apache/pekko/stream/connectors/google/jwt/JwtSprayJson.scala
+++
b/google-common/src/main/scala/org/apache/pekko/stream/connectors/google/jwt/JwtSprayJson.scala
@@ -82,6 +82,13 @@ private[google] class JwtSprayJson private (defaultClock:
Clock)
jwtId = safeGetField[String](jsObj, "jti"))
}
+ // only used for encoding Google service account tokens, JWK parsing is not
needed
+ override def parseJwk(json: String): Jwk =
+ throw new UnsupportedOperationException("parseJwk is not supported")
+
+ override def parseJwkSet(json: String): JwkSet =
+ throw new UnsupportedOperationException("parseJwkSet is not supported")
+
private def safeRead[A: JsonReader](js: JsValue) =
safeReader[A].read(js).fold(_ => None, a => Option(a))
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 9c44e4d91..2d2a975c0 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -66,7 +66,7 @@ object Dependencies {
val CouchbaseVersionForDocs = "2.7"
val GoogleAuthVersion = "1.54.0"
- val JwtScalaVersion = "11.0.4"
+ val JwtScalaVersion = "12.0.0"
val Log4jVersion = "2.26.1"
// Releases https://github.com/FasterXML/jackson-databind/releases
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]