Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/troian/jwtpp

JSON Object Signing and Encryption library for C++.
https://github.com/troian/jwtpp

c-plus-plus-11 cpp encryption-library jose json jwt jwt-authentication signing

Last synced: 3 months ago
JSON representation

JSON Object Signing and Encryption library for C++.

Awesome Lists containing this project

README

        

# jwtpp
JSON Object Signing and Encryption library for C++

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/da9665fd01ba4c759cef755d1ff03d2c)](https://www.codacy.com/app/troian/jwtpp?utm_source=github.com&utm_medium=referral&utm_content=troian/jwtpp&utm_campaign=badger)
[![Build Status](https://travis-ci.com/troian/jwtpp.svg?branch=master)](https://travis-ci.com/troian/jwtpp)
[![Codecov](https://codecov.io/gh/troian/jwtpp/branch/master/graph/badge.svg)](https://codecov.io/gh/troian/jwtpp)

#### Dependencies:
- [jsoncpp](https://github.com/open-source-parsers/jsoncpp)
- OpenSSL

#### Built and tested with:
- GCC
- C++11
- С++14
- С++17
- СLang
- C++11
- С++14
- С++17

#### Supported features:
- Sign
- Verify

#### Supported algorithms
|Alg|Status|
|:---:|:------:|
| HS256 | **Supported** |
| HS384 | **Supported** |
| HS512 | **Supported** |
| RS256 | **Supported** |
| RS384 | **Supported** |
| RS512 | **Supported** |
| ES256 | **Supported** |
| ES384 | **Supported** |
| ES512 | **Supported** |
| PS256 | **Supported** |
| PS384 | **Supported** |
| PS512 | **Supported** |
| EdDSA | **Supported** |

#### Claims
|Claim|Options|Status|
|:---:|:---:|:----:|
|**_ess_**|set,verify| **Supported**
|**_sub_**|set,verify| **Supported**
|**_aud_**|set,verify| **Supported**
|**_exp_**|set,verify| **Supported**
|**_nbf_**|set,verify| **Supported**
|**_iat_**|set,verify| **Supported**
|**_jti_**|set,verify| **Supported**

### How to use
Refer to tests dir

### How to build/install
#### CMake sources deps
add_subdirectory()
#### System-wide installation
On MacOS OPENSSL_ROOT_DIR might need to be specified. Add `-DOPENSSL_ROOT_DIR=$(brew --prefix openssl)` to cmake stage

```bash
git clone https://github.com/troian/jwtpp
mkdir build && cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX= ..
make install
```
#### Homebrew
```
brew tap troian/tap
brew install jwtpp
```

### TODO
- Documentation
- Examples
- Tests

## How to contribute
Just do it! :)