name: libjwt-typed
description: A Haskell implementation of JSON Web Token (JWT)

Above Haskell standard type-safety, the library keeps track of public and private claim names and types. There are no user-facing HashMaps in this library!
A type of a JWT token might be: Jwt &#39;[&quot;user_name&quot; -&gt;&gt; Text, &quot;is_root&quot; -&gt;&gt; Bool, &quot;user_id&quot; -&gt;&gt; UUID, &quot;created&quot; -&gt;&gt; UTCTime, &quot;accounts&quot; -&gt;&gt; NonEmpty (UUID, Text)] (&#39;SomeNs &quot;https://example.com&quot;).
From information encoded with precise types, it automatically derives encoders and decoders. It can also work with generic representations such as records.

libjwt-typed uses libjwt for low-level functionality. libjwt delegates cryptographic work to either GnuTLS or OpenSSL.
This way, not only the most performance-sensitive features work lightning fast, they are also extremely reliable.
Besides, the library does not depend on any JSON library like aeson, but it implements the necessary JSON processing in C via jsmn - which makes it even faster. Benchmarking shows that it can be over 10 times faster than other Haskell JWT libraries.

The library is designed for frictionless use.
It can be easily extended, e.g. to add support for new types or to use custom JSON encodings compatible with other libraries you may already use in your project. Most instances can be derived automatically.
The compilation errors are designed to be informational, i.e. you get Claim &quot;user_name&quot; does not exist in this claim set from GHC, not some 3 page long instance resolution output.

You must have libjwt (preferrably the latest version) installed on your system and visible to the linker.

libjwt-typed links to it at compile time.
You can configure libjwt with GnuTLS or OpenSSL

Please see the full README or browse the docs for more details.
license_spdx: Multics
spec_version: 1.0
home_url: 
            
              https://github.com/marcin-rzeznicki/libjwt-typed
            
          
date: 2022-09-28
about_resource: NONE
libraries_io_url: https://libraries.io/hackage/libjwt-typed
vcs_tool: git
vcs_repository: https://github.com/marcin-rzeznicki/libjwt-typed
vcs_branch: master
