Commit Graph

18 Commits

Author SHA1 Message Date
Chris Mc
0a503e7508 ⬆️ Upgrade boost json to v1.90.0 (#425)
replace deprecated standalone with full release with one component
2026-04-02 10:58:46 -07:00
Chris Mc
df914eba76 🪞 Add support for reflect-cpp's JSON (#421)
* add reflect json traits

* jwt-cpp defaults

* fix clang tidy warnings

* fix clang tidy warnings

* rename directory

* add tests

* add tests

* add tests

* replace unnecessary copy with move

* gate reflect cpp tests behind flag

* reflect cpp CI work

* reflect-cpp example

* reflect-cpp CI

* reflect-cpp CI

* match naming + update ci

* first pass code review

* linter

* linter

* align naming

* make file +x

* align target name

fix order or targets in tests

* fix typo

* Fix target_link_libraries syntax for jwt-cpp

* cleanup example code

* add reflect-json to coverage tests

---------

Co-authored-by: Ali Girayhan Ozbay <aligirayhan.ozbay@abex.capital>
Co-authored-by: Ali Girayhan Özbay <aligirayhan@ozbay.org>
2026-03-09 22:19:31 -07:00
Chris Mc
5ee8567d4a Add Glaze Support (#417)
* feat: add glaze traits

* fix: format

* name glaze_json, add to ci, add example

* code review

* linter

* disable linter for glaze tests

* add badge to docs for new library

---------

Co-authored-by: Curve <fynnbwdt@gmail.com>
2026-03-02 20:25:31 -08:00
JurgenLB
91848add8f Additional Appveyor warnings (#408)
* Fix lcov line number mismatch for ClaimTest::AudienceAsString (#1)

* Add blank line before TEST macro to fix coverage line mismatch

* Verify tests pass after fix

* Remove CodeQL build artifacts and update .gitignore

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JurgenLB <77586573+JurgenLB@users.noreply.github.com>

* Remove blank line

* Add concurrency to traits job

Add concurrency settings to traits job in workflow

* Additional spacing added to prevent geninfo line mismatch errors

* Fix concurrency group in traits workflow to prevent job cancellations

* fix-msvc-type-trait-warnings

* Apply clang-format

* Fix formatting issues

* Fix formatting issues in jwt.h

* format

* Update jwt.h

* Remove unwanted reference

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-02-16 10:47:27 -08:00
Damiano Mazzella
d3b93ef1e3 update trait dependencies to support CMake v4 (#379)
* update nlohmann-json to 3.12.0 (fix cmake min version)

* Bump fetch ver

Needs new md5

* 3.12 md5

* Limit hunter cmake version

* bump jsoncpp version to v1.9.6 as well

* bump workflow as well as default

---------

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2025-05-13 10:44:51 -04:00
Damiano Mazzella
82e5dae762 Update jsoncons trait to support v1 release (#375)
* Update traits.h

* fix actions fails

* update version of jsoncons warkflow traits and install action

* update example/traits/danielaparker-jsoncons.cpp

* Drop support of the 0.x release of jsoncons

* Update jsoncons to 1.3.2 and nlohmann-json to 3.12.0

* revert the changes for nlohmann-json

---------

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2025-05-13 10:16:48 -04:00
Chris Mc
8ed685e5f7 Bump GitHub Actions to latest versions (#326)
* bump actions

* avoid conflicts

* work around nodejs being too new

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04

* clang-format-14 needs ubuntu 22

* dont use source

* limit check to v3 

there no docker image for node 20 on debian buster with gcc-4.8 and ubuntu 18 has a glibc that is too low

we'll need to checkout manually when needed

* explicit format

* Update jwt.yml

* clean up attempt code
2024-01-23 10:56:48 -08:00
cjserio
65cda08210 Implemented JsonCPP Traits (#317)
* Implemented JsonCPP Traits

* quick pass to add CI

* correct find_packge to use config and not be required

* typo in default version

* jsoncpp forces out of source builds

* disable tests and shared library

* add missing build step

* try a different target + build less 

"they" do not maintain the CMake scripts so this will be fun https://github.com/open-source-parsers/jsoncpp/issues/455#issuecomment-478251641

* fix name for traits (missed replaces)

* Added missing array_type constructor so that basic_claims can be formed from sets of values

* Linters and more tests + fetchcontent gtest

* linter

* support library names with many separators

* linters

* run clang format after rendering defaults

---------

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2023-12-16 12:27:13 -08:00
Dominik Thalhammer
649530a6f0 ⬆️ Upgrade various ci packages being deprecated soon (#268) 2022-10-31 20:25:38 +01:00
Chris Mc
03ad09b996 ⬆️ Update tested JSON libraries (#260)
* bump the json libraries being used

* bost json dropped the standalone mode in 1.79 d20a814685

Co-authored-by: Dominik Thalhammer <dominik@thalhammer.it>
2022-10-23 17:16:24 -07:00
Stéphane Janel
07a2f64b0d 📤 Do not embed nlohmann::json directly, use find_package / FetchContent instead (#254)
* Do not embed nlohmann::json directly, use find_package / FetchContent instead

* Clea up traits workflow

Headers are no longer vendored

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2022-10-03 11:01:42 +02:00
Chris Mc
8254f7cdfb Composite actions for badging (#196)
* Improved badging actions

use new composite if feature to perform more heavy lifting (making the workflows more DRY)

* only make badges on push

* update ssl traits

* replace success/failure with generic write
2022-01-22 17:37:43 -08:00
Chris Mc
5c9787ebca 🚢 Provide trait implementation for supported JSON libraries (#193)
* quick poc for Thalhammer#174

* Copy paste

* Rename include/jwt-cpp/traits/traits.h to include/jwt-cpp/traits/danielaparker-jsoncons/traits.h

* Create traits.h

* adding a namespace

* mustache + action to automate defaults generation

since they should always be the same

* fix order

* traits tests should use traits

* playing with header order

to make clang happy

* install all possible traits 

switch badge name to sha

* Update CMakeLists.txt

* Update traits.h

* try commenting corrected code

* rm typescript

* make sure to implace edit

* dont comment when no diff

* apply linting

* fixup boost-json traits

* move comment and render to composite action

* actions/github-script does not leave context in the usual spot

* enabled globstar

* make sure to forward inputs

* try using env normally

* fix typo

* pass in linter name correctly

* debug print

* fix linting issues

* more debug printing

* fix linting issues

* fix typpo + more rebug print

* apply linting

* more debug

* try npm install global to be less intrusive

* wip render traits tests

* Update lint.yml

* global install does not work

* Update action.yml

* Update defaults.h

* remove nodejs action poc

* include jsoncons in main test application (for coverage of new files)

* do not exclude json (since it's used by all the traits)

* exclude bundled json libraries

* apply linting

* add jsoncons for coverage testing

* jsoncons set default to a viable version

* exploring ci failure

* Revert "exploring ci failure" it's overlapping symbols

This reverts commit 3d5b7f9f5d4f393f03b84a59557fecdee833c822.

* add missing specialization

* be explicit with the tests

* Create CMakeLists.txt

* Create danielaparker-jsoncons.cpp

* Update lint.yml

* Update traits.yml

* lint

* better access too decoded claims

* more tests on verify

* tweak test

trying to find minimum

* lets enable linting tests

* using env impl for github script

* fix typo

* apply linting

* add boost to the tests (very hacky)

* Update lint.yml

* ceate light boost installer

there is no cmake install anymore so just a blanket copy should do

* remove path requirement

* outline for commit and push linting on comment

* try different webhook target

* more event types

* fix if for more event types

* just a test commit

* Update lint.yml

* Update lint.yml

* Update lint.yml

* Apply automatic changes

* add token

* screw up formatting

* Update lint.yml

* Update lint.yml

* Apply automatic changes

* fix merge conflicts

* missing errors

* playing with globbing

* lint issues

* matrix on comment should give many pushes

* Apply automatic changes

* Update lint.yml

* Apply automatic changes

* Apply automatic changes

* fix rebase

* apply render tests

* Apply automatic changes

* Apply automatic changes

* Delete package-lock.json

* fail linting

* Update .gitignore

* Update lint.yml

* Update lint.yml

* Update lint.yml

* Apply automatic changes

* Update lint.yml

* Update CMakeLists.txt

* refactor boost.json inclusion

- find paths
- compile library
- code coverage
- traits example

* Apply automatic changes

* debug log

* Update action.yml

* debug output

* Update action.yml

* Delete private-boost-json.cpp.in

* Update private-find-boost-json.cmake

* Update CMakeLists.txt

* Update CMakeLists.txt

* Create CMakeLists.txt

* Update boost-json.cpp

* Update boost-json.cpp

* Update boost-json.cpp

* Update boost-json.cpp

* remove old boost tests

* examples to include traits

* fix compilation

* test nlohmann json traits

* linting

* refactor traits to make badges

* try with less expression syntax

* trying single quotes

* advertise traits support

* Update lint.yml

* Update lint.yml

* Update lint.yml

* sync (prince-chrismc/jwt-cpp#16)

* 🔧 Replace RSA related deprecated functions (#189)

* RSA_size() --> EVP_PKEY_size()

* getting rid of deprecated functions in rsa-pss signature creation

* getting rid of deprecated functions in rsa-pss signature verification

* generate_hash not used in pss

* Update lint.yml

* Update lint.yml

* Update lint.yml

Co-authored-by: Marek Klein <kleinmrk@gmail.com>

* Update lint.yml

* make sure to use install `nlohmann-json`

* make action folder match trait names

* add example + badge for kazuho-picojson

* link to new examples

* revert debug code

* dont mix matrix with uses

* fix bad copy paste

* spec interface library so it's no compiled

* fix installer

* fix to interface

* fix example

* attempt 2

* make sure to avoid circular reference

* attempt 3

* white space

* white space

* Update and rename .github/actions/comment-linting/action.yml to .github/actions/process-linting-results/action.yml

* Update lint.yml

* Update action.yml

* Update action.yml

* Update README.md

Co-authored-by: prince-chrismc <prince-chrismc@users.noreply.github.com>
Co-authored-by: Marek Klein <kleinmrk@gmail.com>
2022-01-17 14:05:01 -08:00
Chris Mc
ab1a60ec8a ⬆️ Bump danielaparker/jsoncons to v0.167.1 (#178)
* Update traits.yml

* Update traits.yml

* better error report for missing method

* clean up traits implementation

in prep for Thalhammer#174
2021-09-27 09:23:36 -04:00
Chris Mc
bb8627bf66 🗺️ Add support for Boost.JSON traits (#165)
* wip boost test

* wip hardcoded just to test

* wip more

* working POC

* trying boost json with c++17

* working boost json standalone with cxx17

* Delete conanfile.txt

* revert some changes to see if they are required

* adding a workflow

* cleanup

* naming convention

* testing for substr on string_type

* trying to test for operator+

* fix check for operator+

* losen std::string requirement (experimental)

* Update .gitignore

Co-authored-by: gerardoprada <gerardoprada@users.noreply.github.com>

Co-authored-by: gerardoprada <gerardoprada@users.noreply.github.com>
2021-09-13 20:10:04 -04:00
Arjen Hoogesteger
14061f1e11 🛠️ User set CMake install subdirectory + cross-platform default location (#142)
* Changed the JWT_CMAKE_FILES_INSTALL_DIR such that it is found on both Windows and Unix and that it may be configured to something entirely different

* Update cmake.yml

* Update cmake.yml

* Update CMakeLists.txt

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Update .github/workflows/cmake.yml

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Update .github/workflows/cmake.yml

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Update .github/workflows/cmake.yml

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

Co-authored-by: Arjen Hoogesteger <arjen.hoogesteger@sweco.nl>
Co-authored-by: Arjen Hoogesteger <65287900+sweco-nlahoo@users.noreply.github.com>

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update traits.yml

* trying different cmake path + debug in actions

* fix typo

* quick test for installing in lib dir

* revert

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2021-05-19 11:50:22 -04:00
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