libjwt-typed: A Haskell implementation of JSON Web Token (JWT)
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 '["user_name" ->> Text, "is_root" ->> Bool, "user_id" ->> UUID, "created" ->> UTCTime, "accounts" ->> NonEmpty (UUID, Text)] ('SomeNs "https://example.com").
From information encoded with precise types, it automatically derives encoders and decoders. It can also work with generic representations such as records.
Speed and robustness
libjwt-typed uses libjwt for low-level functionality.
libjwt delegates cryptographic work to either
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.
Ease of use
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 "user_name" 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
Please see the full README or browse the docs for more details.
[Skip to Readme]
|Versions [RSS] [faq]||0.1, 0.2|
|Dependencies||base (>=188.8.131.52 && <4.15), bytestring (>=0.10.10.0 && <0.11), case-insensitive (>=184.108.40.206), casing (>=0.1.4.1 && <0.2), data-default (>=0.2 && <1.0), either (>=220.127.116.11 && <5.1), exceptions (==0.10.4), extra (==1.7.*), monad-time (==0.3.*), proxied (==0.3.*), text (>=18.104.22.168 && <1.2.5), time (==1.9.*), transformers (>=0.5.6.2 && <0.6), unordered-containers (>=0.2.10.0 && <0.3), utf8-string (>=22.214.171.124 && <1.1), uuid (>=1.3) [details]|
|License||MPL-2.0[multiple license files]|
|Copyright||2020 Marcin Rzeźnicki|
|Maintainer||Marcin Rzeźnicki <firstname.lastname@example.org>|
|Source repo||head: git clone https://github.com/marcin-rzeznicki/libjwt-typed.git|
|Uploaded||by rzeznik at 2020-09-21T18:52:12Z|
|Downloads||190 total (9 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
Docs uploaded by user [build log]
All reported builds failed as of 2020-09-21 [all 1 reports]
For package maintainers and hackage trustees