From 0505ac8bc4301ea3d0fbb5cadacff117e4f2fdee Mon Sep 17 00:00:00 2001 From: Christopher McArthur Date: Wed, 10 Jun 2020 21:23:30 -0400 Subject: [PATCH] adding overview to readme explaining macros/configurations --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index b42599a..611c416 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,15 @@ For the sake of completeness, here is a list of all supported algorithms: * PS384 * PS512 +## Overview +Since 0.5.0-dev, there is no hard dependency on a JSON library; instead there's a generic `basic_claim` which is templated around the types required. It requires the "value type", object, array, string, number, integer, and boolean types and a traits type. + +In order to maintain compatibility, [picojson](https://github.com/kazuho/picojson) is still used to provide a specialized `claim` along with all helpers. Defining `DISABLE_PICOJSON` will remove this optional dependency. + +For using other JSON libraries, the picojson implementation is a good reference. + +As for the base64 requirements of JWTs, this libary provides `base.h` with all the required implentation; However base64 implementations are very common, with varying degrees of performance. When providing your own base64 implementation, you can define `DISABLE_BASE64` to remove the jwt-cpp implementation. + ## Examples Simple example of decoding a token and printing all claims: ```c++