{"repo":"arun11299/cpp-jwt","free":true,"listed":false,"github":"https://github.com/arun11299/cpp-jwt","clone":"git clone https://github.com/arun11299/cpp-jwt.git","description":"JSON Web Token library for C++","language":"C++","stars":441,"topics":["cpp11","cpp14","cpp17","jwt","jwt-header","security"],"license":"MIT","category":"security-tools","readme_excerpt":"CPP-JWT A C++14 library for JSON Web Tokens(JWT) A little library built with lots of ❤︎ for working with JWT easier. By Arun Muralidharan. Table of Contents - What is it - Example - API Philosophy - Support - External Dependencies - Thanks to... - Compiler Support - Installation - Parameters - Claim Data Types - Advanced Examples - Error Codes & Exceptions - Additional Header Data - Things for improvement - LICENSE What is it ? For the uninitiated, JSON Web Token(JWT) is a JSON based standard ( RFC-7519 ) for creating assertions or access tokens that consists of some claims (encoded within the assertion). This assertion can be used in some kind of bearer authentication mechanism that the server will provide to clients, and the clients can make use of the provided assertion for accessing resources. Few good resources on this material which I found useful are: Anatomy of JWT Learn JWT RFC 7519 Example Lets dive into see a simple example of encoding and decoding in Python. Taking the example of pyjwt module from its docs. Now, lets look at our C++ code doing the same thing. It outputs: Almost the same API, except for some ugliness here and there. But close enough! Lets take another example in which we will see to add payload claim having type other than string. The payload function used in the above example to create jwt object object can only take strings. For anything else, it will throw a compilation error. For adding claims having values other than string, jwt object class p","default_branch":null,"files":null,"tree":[],"storefront":"/r/arun11299","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/arun11299/cpp-jwt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}