diff --git a/src/blog/directory.conf b/src/blog/directory.conf index 9948eccc..0191d7e1 100644 --- a/src/blog/directory.conf +++ b/src/blog/directory.conf @@ -553,11 +553,11 @@ valencik { } vlovgr { - name: "Viktor Lövgren" + name: "Viktor Rudebeck" avatar: "https://github.com/vlovgr.png" github: vlovgr - twitter: vlovgr - bio: "Viktor is a Software engineer at Ovo Energy in London, working on the platform powering energy meter readings and consumption data. He’s an advocate of strongly typed functional programming, and Scala in particular, which has been his professional focus the past three years." + url: "https://vlovgr.se" + linkedin: "https://linkedin.com/in/vlovgr" } yifanxing { diff --git a/src/blog/jots.md b/src/blog/jots.md new file mode 100644 index 00000000..9bb0fbac --- /dev/null +++ b/src/blog/jots.md @@ -0,0 +1,40 @@ +{% + author: ${vlovgr} + date: "2026-11-14" + tags: [technical] +%} + +# Jots: Functional JWTs for Scala + +I am happy to announce that my library [Jots](https://vlovgr.github.io/jots) has been accepted as a Typelevel affiliate project. + +![Jots: Functional JWTs for Scala](/img/media/jots.png) + +Jots is a library for working with [JSON Web Tokens (JWTs)](https://en.wikipedia.org/wiki/JSON_Web_Token) in Scala, Scala.js and Scala Native. + +- Supports token signing and verification, including with [JSON Web Keys (JWKs)](https://vlovgr.github.io/jots/features/signing.html#json-web-key) and [JWK Sets](https://vlovgr.github.io/jots/features/verification.html#json-web-key-set). +- Integrates with [http4s](https://vlovgr.github.io/jots/integrations/http4s.html) for `AuthMiddleware` verification and periodically refreshing JWK Sets. +- Uses the Cats Effect, Circe, Literally and scodec-bits Typelevel libraries in the core module. + +## Cryptography + +Token signing and verification are built on an independent [`jots-crypto`](https://vlovgr.github.io/jots/features/cryptography.html) module. + +- Provides a `Crypto[F]` capability for effect types with a `Sync` instance, like `IO` and `SyncIO`. +- Supports HMAC, plus signing and verification using ECDSA, EdDSA and RSA algorithms. +- Uses Java cryptography on the JVM, Node.js on Scala.js and OpenSSL on Scala Native. +- Includes a `String` interpolator for public keys, which are validated at compile time. + +The module can be used on its own when you need cross-platform cryptography. + +## Testing + +The [`jots-testing`](https://vlovgr.github.io/jots/features/testing.html) module helps with writing tests for code using the library. + +- Provides ScalaCheck generators and `Arbitrary` instances for tokens, keys, JWKs and more. +- Adds `String` interpolators for private keys, secret keys and tokens, validated at compile time. +- Allows tests to bypass signature verification, which is something the core module prevents. + +## Getting Started + +For more information and how to get started, head over to the [project website](https://vlovgr.github.io/jots). diff --git a/src/img/media/jots.png b/src/img/media/jots.png new file mode 100644 index 00000000..37468d0d Binary files /dev/null and b/src/img/media/jots.png differ