Commit Graph

10 Commits

Author SHA1 Message Date
Chris Mc
b21d80c22e 🧰 Linting and maintenance (#120)
* some manual fixes to obtain

* fairly close enough

* whitespace fixes

* add comment

* adding clang format + applied

* add editorconfig (supported natively by github web editor)

* apply linting to project

* clean up CI workflows

* zap vcpkg folder

actual one is here
https://github.com/microsoft/vcpkg/tree/master/ports/jwt-cpp

* adding a logo

* thin the lines in the pluses

* use logo + more links to spec and examples

* Create lint.yml

* apply linting
2021-01-11 17:37:14 -05:00
Chris Mc
933fc1681f 🎛️ Expand support to include non STL container based JSON implementations (#117)
* initial outline for a jsoncons traits implementation

https://github.com/danielaparker/jsoncon

fix extracted dir

* make sure to set cmake to current directory

* install jwt + pass install prefix

fix bad copy paste

fix filename

* Update JsonconsTest.cpp

* add checks for type alias in object_type

* poc for checking for `cbegin` (begin does not work because of overloads... no sure how compilers do this in for loops

* add checks for begin method

* check for begin const overload

* add missing details to object_type

rm extra update

fix using ctor

* adding missing type trait for pretty print

fix typo

fix type extraction

* fix object wrapper extraction

revet int extraction

* try calling ctor directly

trying a differnt ctor

* trying operator[] with no args (hoping for default ctor)

* adding missing pair to second from it

* dont assume std::pair

more adjustments

* apply constness

* refactor parsing of claims to no longer assume/require std::pair

cherry picking https://github.com/dtiukalov/jwt-cpp/pull/1

* add missing header

* adding missing at functors

* add missing move assignment

fixes

implementing compilers

more indirection

attempt 3

more fixes

more ctors

oen more time

again

* fix serilization

* prefer apt-get for stable cli

* add note about serializationg requirements in readme

* adding call to get decoded claims (this should fail)

* print helpful failure message

* move get claim to traits test that support it

* remove cbegin traits check (not used) replaced with end

* adding count, at, and [] requirements to traits

dont used removed functions

update tests

changed missing claim to return expected ISO exception base type

* remove extra nesting namespace
2021-01-09 09:39:02 -05:00
Jaideep Bajwa
aa258bdfdf Add helper function to convert cert from base64DER to PEM (#106)
* Add helper function to convert cert from base64DER to PEM

This is particularly useful when dealing with JWKs x5c claim which
is encoded as base64 DER. With this helper function the client can
convert x5c claim to PEM, which makes it easy to interact with this
library.
2020-11-08 22:04:51 +01:00
Dominik Thalhammer
ab37be7df4 Initial support for std::error_code (#86)
* Add error_code support to algorithm::verify

* Add error_code support for signing

* Add error_code overloads to verifying

* Fix missing throw

* Improvements

* Remove unused throwing overloads

* Fix test on older gtest

* Found bug and added more testing

* Move exceptions into error namespace
2020-07-21 18:30:51 +02:00
Christopher McArthur
767c3fc827 [skip ci] more progress 2020-05-20 14:23:28 -04:00
Christopher McArthur
56ffe083ae tester that compiles 2020-05-18 22:25:19 -04:00
Chris Mc
6793369939 token expected as per jwt.io
https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiJ9.eyJuYW1lc3BhY2UiOnsiYXBpLXgiOlsxXX19.F8I6I2RcSF98bKa0IpIz09fRZtHr1CWnWKx2za-tFQA
2020-03-28 17:30:09 -04:00
Christopher McArthur
92ddc67817 Adding SetObject to ClaimTests 2020-03-28 17:19:15 -04:00
Christopher McArthur
a9a1b80eda adding tests to cmake 2020-01-19 17:25:51 -05:00
Christopher McArthur
bb42fd9472 moving tests to a subdir 2020-01-19 15:08:20 -05:00