Commit Graph

64 Commits

Author SHA1 Message Date
Chris Mc
3e037df3e6 🧹 Improve linters for traits (#424)
* quick poc at using cmake to generate the defaults.h traits files

* add test preset to dev

* self review

* poc moving logic to actions

* Remove stale defaults.h generation configuration

* Fix file path in lint workflow configuration

* chmod +x

* linter

* linter

* clean up action and lint workflow

* rm source_dir cli arg from cmake script

now just assume the current directory is correct

* linter

* fix order

* add workflow preset for running unit test

sadly then is less reusable than i wanted
2026-03-24 18:11:15 -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
75dd7aa5c1 📈 Expanding testing coverage to all JSON trait implementations (#419)
* typed tests for all the various json implementation

more coverage of all the various traits

* Configure LCOV_OPTS for coverage reporting

Add LCOV_OPTS to ignore errors in coverage report

* linter

* Update LCOV_OPTS to ignore multiple mismatch errors

* Configure LCOV to ignore mismatches

Added configuration for LCOV to ignore mismatches in coverage reports.

* try to pass lcov args + cleanup excludes

* directly pass lcov args

* fix min cmake req

prepend is 3.15, seems overkill
2026-03-06 20:44:55 -08: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
Chris Mc
58622a3f01 🏷️ Set version to 0.7.2 + Document release steps (#414)
updated doxygen to 1.14.0 and doxygen-awesome-css to 2.4.1
2026-02-25 17:55:44 -08:00
Eero Aaltonen
cf0dab1263 Fix error in CMake config-file package (#387)
Fixes error
```
  The link interface of target "jwt-cpp::jwt-cpp" contains:

    picojson::picojson>

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
```

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2025-06-19 15:35:27 -07:00
Dominik Thalhammer
0c676f86b7 👷 Update CMP0135 to new behaviour (#385)
closes #384
2025-05-27 11:16:31 +02: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
Chris Mc
e71e0c2d58 Update version to 0.7.1 (#373) 2025-03-09 22:00:21 -07:00
Daniel Nicoletti
6dd190d154 Update CMakeLists.txt (#365)
Specify C++ language to avoid searching for C compiler
2024-11-02 10:10:36 +01:00
Juliusz Sosinowicz
a968dfe4f7 Fix build and tests for wolfSSL (#352)
* Fix build and tests for wolfSSL

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>

* Remove unnecessary symbols

* Don't fail fast on wolfSSL actions

* Include wolfssl/options.h explicitly

* Fix old wolfSSL failures

* remove unused EVP_PKEY_get1_RSA

this is deprecated with 3.0

* code review comments

* Apply suggestions from code review

* rm extra headers?

* fix cmake test

use the new macro that was required

* linter

* fix unused warning fail_HMAC

* reenable fail fast

* fix spelling

---------

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2024-07-29 08:14:34 -07:00
Chris Mc
a6927cb814 Add support for CMake Presets (#348)
* dev container + vscode extensions

* exploring cmake presets for CI

* ignore user presets

* add configure to build preset

windows ran in debug, which means the multi config needs more help

* coverage preset

* creating a fuzzing preset

* fuzzing fix cwd + more configs to preset

* move cmake set vars to right section

https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170

"You can set C and C++ compilers by using cacheVariables.CMAKE_C_COMPILER and cacheVariables.CMAKE_CXX_COMPILER in a Configure Preset. It's equivalent to passing -D CMAKE_C_COMPILER=<value> and -D CMAKE_CXX_COMPILER=<value> to CMake from the command line."

* fix workdir for new fuzz run targets

* split up presets into more files

* fix include order (liking this less)

* add asan to presets

* fix copy paste

* add asan build preset

* move ubsan to presets

* replace mustache with a cmake script

* touch ups

* restore file to void merge conflicts

* fix order for args

* remove action wrapper

more quotes for inputs

* revert bad render of boost_json

* fix casing

* format changes

* test to see if output is working

* last try

* git revert moving mustache to cmake

* cmake not enough for presets

* drop ci prefix

* new test for `library_ROOT` search path

* install with presets

* cmake --install does not take a preset

* install with preset is not yet supported

https://gitlab.kitware.com/cmake/cmake/-/issues/23208

* add missing build step

* more global fuzzing flags to toolchain file

* fixup toolchain in presets

* fix pathing and limit configs to tested platforms

* clean up + use presets for clang-tidy

* dry up sanitizer flags

* try install with a preset

* remove duplicated test

* notes about hunter test

* skip checking the compiler since this causes errors with the same CMake uses in combinations with the fuzz sanitizer flag

https://github.com/prince-chrismc/jwt-cpp/actions/runs/7481024827/job/20361722539?pr=33

```
    /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x22
    CMakeFiles/cmTC_ff7c6.dir/testCCompiler.c.o: in function `main':
    testCCompiler.c:(.text.main[main]+0x0): multiple definition of `main'; /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o):(.text.main+0x0): first defined here
    /usr/bin/ld: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o): in function `main':
    (.text.main+0x12): undefined reference to `LLVMFuzzerTestOneInput'
```

* remove system name to disable cross compiling

* tests do not pass clang-tidy

* drop toolchain, use target specific flags

* leave flags in cmake

* missing deps + clean apt files

* remove some code duplication

* fix typo

* devcontainers fix, test and add wolfssl

refactored installer to have a script that could be reused

* add missing build context

* pass version to script

* dont use bash syntax

* fix typo

* upload tar.gz for new releases

* revert name to manually trigger it

* Update and rename nuget.yml to release.yml

* disable nuget for testing

* add a zip as well

* back to basics

* remove remove testing code

* update workflow name

* enable testing needs to be in the root

* add a test preset and use it in some workflows

* fix linting tests

* bump github actions

* bump python setup

* drop dev containers

* dont install openssl on windows

* revert merge conflicts

* fix whitespace

* fix private claims example to have a valid token

#351

* put back versioned format

I dont remember why, it looks like it was debugging
2024-06-15 07:52:23 -07:00
Justen Di Ruscio
d53e01333e Find nlohmann_json dependency only when required (#342)
* only find nlohmann_json test dep when required

* provide config-variable JWT_EXTERNAL_TEST_NLOHMANN_JSON

* be a doll and make PICOJSON variables dependent

* dont mention test in the option name

I think in the longer term we'll probably switch to this since it;s maintained unlike the current default

---------

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2024-04-20 12:07:32 -07:00
Chris Mc
3ddac0c776 Documentation Refresh (#323)
* Create getting-started.md

* Update getting-started.md

* Create header-only.yml

* Create package-managers.yml

* Update package-managers.yml

* Update getting-started.md

* Update getting-started.md

* Update header-only.yml

* Update header-only.yml

* Update header-only.yml

* Update header-only.yml

* use `jwt::algorithm::hs256`

 to link against openssl

* add crypto

* switch to ssl

* Update header-only.yml

* tidy

* lets install conan

* tidying

* Adding a CMake target to make the docs

* cleaning up repo root folder

* fix typo

* set docs flag as on

* update awesome doxy theme to latest

* Updated overrides for new version

* output folder and target name are changed

* add a few more docs

* white space

* cmake format

* playing with settings

* move algorithms - magically fixed missing structs

* playing with the idea of more refactoring

* more testing

* moved evp_handle def to special namespace for doxygen

* split evp class by it's self

* fix doc links

* playing with evp class to fix error -- no luck

* revert testing changes

* clang format

* cache should be container specific

* clean up includes

* combined class definition

* split algos but running in ci with older version

* trying slightly newer version of doxygen

* doxygen 196

* doxygen 197

* doxygen 198

* avoid regression in 198

* more docs

* playing with adding examples

* playing around with example support to see if I like

* docs include all the example files to be referenced in the code

* bump version to 0.7.0

* missing header

* devcontainer for testing openssl 3

* add test explorer

* add clang helpers

* there's a lot of package managers in 2023

* fixup colors with doxygen 1.10

* bump doxygen version

since my bug has been fixed

* move everything to one file (too many changes)

* update doxyfile to 1.10

* minimize diff

* fix extra line

* fix whitespace

* clean up dev container

* min changes

* cleanup

* better checking + warnings for doxygen

* whitespace

* adding in more docs

* fix spelling

* make sure traits appear

* trying to add snippets from examples

cant figure it out
https://github.com/doxygen/doxygen/issues/10517

* Update faqs.md

* Delete .github/workflows/header-only.yml

* Delete .github/workflows/package-managers.yml

* Delete example/conan/CMakeLists.txt

* Delete example/conan/conanfile.txt

* Delete example/conan/main.cpp

* Delete example/conan/README.md

* Update nlohmann-json.cpp

* add updated getting started docs

first pass towards https://github.com/Thalhammer/jwt-cpp/issues/319

* touch ups

* linking deprecated messages

* improve cmake with find_package examples

* fix code link color

* be more clear about turning off examples

good suggestion

https://github.com/Thalhammer/jwt-cpp/pull/321#issuecomment-1870488941

* clarify openssl install and fixup fetch tag

* apply workaround from

https://github.com/doxygen/doxygen/issues/10517#issuecomment-1870509240

* fix renamed types

* linting

* cross reference new docs

* trying new alert syntax

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts

* move sections out of readme

trying to make it shorter and more approachable

* improve "getting started" readme section with a more through example

* sort out doubled "getting started"

second one in docs/ is just installation

* linter

* fixup english

* formatting

* whitespace

* tie in more examples with snippets

* minor touch ups

* Update signing.md

* JWT_BUILD_DOCS

* better cache string for new option

* word crafting

* word crafting

* add missing open-source-parsers/jsoncpp to traits list

* better github alert

* fixup new shields io start style

* improve docs cmake target name

* linter

---------

Co-authored-by: Christopher McArthur <christopherm@jfrog.com>
2024-01-10 09:29:46 -05: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
Chris Mc
08bcf77a68 Set version to 0.7.0 (#299) 2023-12-10 17:50:22 -05:00
Alejandro Criado-Pérez
6fed66d0d5 Corrected a few typos (#297)
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2023-07-25 18:45:15 +02:00
Dominik Thalhammer
bdc1a07bda 📤 Use nlohmann_json tar release (#259)
* 📤 Use nlohmann_json tar release

This avoids downloading the whole git repository and restricts the download
to the pieces that are actually important, saving time and traffic.
2022-10-09 18:57:28 +02: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
4a537e9698 Set version to 0.6.0 (#208) 2022-02-11 12:10:06 +01:00
Chris Mc
ba1077f95d Run CMake with relative paths for Hunter (#206) 2022-02-06 14:13:26 +01:00
Chris Mc
142d2d38e7 🖊️ Update documentation layout (#202)
* split docs into sub pages

* lets see if we can fix the logo size on doxy

* try usine a theme to make it more modern

* fix bad link

* fix broken link

* Update docs/faqs.md

Co-authored-by: Dominik Thalhammer <thalhammer.d@googlemail.com>

* Update faqs.md

Co-authored-by: Dominik Thalhammer <thalhammer.d@googlemail.com>

* Update Doxyfile

Co-authored-by: Dominik Thalhammer <thalhammer.d@googlemail.com>

* Update README.md

* clean up utc vs localtime FAQ

* fix the table image colors

following https://github.com/jothepro/doxygen-awesome-css#css-variables

* fix colors for class index

* enable graphics diagrams

* fix colors

* fix version number

we missed a patch release

* white space

* fix docs not matching code

* Improve SSL selection docs

Co-authored-by: Dominik Thalhammer <thalhammer.d@googlemail.com>
2022-01-30 16:31:20 -08:00
alexeyserbin
97c8782605 🔐 Make it possible to build with OpenSSL 1.0.1 (#199)
* Make it possible to build with OpenSSL 1.0.1

This patch updates the code in the jwt-cpp/jwt.h header and relaxes the
requirement for OpenSSL's version in the top-level CMakeLists.txt to
allow for compiling with OpenSSL 1.0.1.  The patch works around the
non-constantness of the 'sig' parameter in the signature of the
EVP_DigestVerifyFinal() function in versions of OpenSSL prior to 1.0.2.

I verfied it's now possible to compile with OpenSSL 1.0.1, but I guess
it might be possible to compile even with OpenSSL 1.0.0 after tweaking
the version requirement in CMakeLists.txt.

The new EVP_DigestVerifyFinal() signature was introduced in [1] and then
cherry-picked into the main branch as [2].  The update [1] doesn't
contain any functional change per se: even prior to the update,
EVP_DigestVerifyFinal() implementation was de facto treating the 'sig'
parameter as if it were immutable [3].

[1] 1abfa78a8b
[2] 0f7fa1b190
[3] 27007233db/crypto/evp/m_sigver.c (L163-L187)

* Fix formatting in jwt-cpp/jwt.h

This patch doesn't contain any functional modifications.

This is a follow-up to d74c832bd9fae79c2dcaf0def67e3c2c501a6b80.

* Test against OpenSSL 1.0.1u

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
2022-01-24 23:09:48 -08:00
Chris Mc
e6b92cca0b 🖌️ With hunter use relative CMake install path (#198) 2022-01-24 13:02:30 -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
de457af919 🐺 Add WolfSSL support (#171)
* outline for wolfssl support

lots of missing symbols

* rm old libressl dockerfile

* ass wolfssl test + dry up workflows

with improved composite action having `use` keyword

* autoreconf

* brute force zap openssl headers

* Update action.yml

* try to access nested headers

* trying to log include headers

* more debug logs

* fix bad variable

* tweaks

* more features

* cleanup

* wolfssl is special like libressl

* test header order

* revert order

* trying wolfssl master

* adding wolfssl compatiblity macros

trying to get access to

1662b01157/wolfssl/ssl.h (L3960)

* trying no newline

to fix tests

* typo

* bad copy paste pt2

* not a new line problem

* typo

* workaround failing helper test

* update cmake test

list(TRANSFORM raised min

* test cmake install with wolfSSL

* add missing EOF

* more generic wolfssl install

since there is no release that works yet

* typo

* debug print

* add more checks

* force HAVE_ECC

* install master

* hunter does not support wolfssl

* pretty job name

* clean up

* Update README.md

* bump to latest master

* Update cmake.yml

* bump coveralls action

* switch badge name to sha

* Update jwt.yml

they published a bad tag =)
2021-09-21 21:30:54 -04:00
Chris Mc
7fd8470cf1 🧷 Fuzz testing (#98)
* Update coverage.yml

* adding a fuzz test

* adding more fuzzing

TBA how to handle input requirement of decode

* base64 encoding input to avoid "obvious" exceptions

trying out the EVP_ interface from #89

* fixing decode fuzz

* accepting exceptions are normal

After comparing with https://github.com/nlohmann/json/blob/v3.9.0/test/src/fuzzer-parse_json.cpp I must agree data can be random so it should be accepted

* decoding twice should produce the same result

again based on https://github.com/nlohmann/json/blob/v3.9.0/test/src/fuzzer-parse_json.cpp

* fixing token decode fuzzer

* adding corpus for fuzz tests + adding them to ci

* removing numbers with more meaning descriptions

* Update BaseEncodeFuzz.cpp

* Update coverage.yml

* Update coverage.yml

* shrink interations

* cleaning cmake

* Update and rename coverage.yml to jwt.yml

* Update lint.yml

* Update jwt.yml

* Update jwt.yml
2021-09-17 20:01:38 -04:00
Chris Mc
3d501217a3 🧰 Adding clang-tidy, cmake-format, and ASAN tests (#168)
* adding clang-tidy and asan tests

Playing with clang-tidy, we already had the rule removed in #166... running the static analyzer from CMake reproduced the report in many places... I suspect the macro and `new`/`delete` separation clang-tidy is just unable to understand.

Running the problematic examples + tests with the ASAN enabled reported no problems

* Apply suggestions from code review

* Update lint.yml

* applying linting rules

* fix bad rename

* formating

* clang-tidy on jsoncons tests

* and cmake-format to lint

* cmake format improve change detection

* Update lint.yml

* apply linting
2021-09-17 19:42:21 -04:00
Dominik Thalhammer
ac0424b115 Integrate Hunter package manager support (#163)
* Add initial hunter support
2021-09-04 21:24:23 +02: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
159527930e Make LibreSSL support official (tested against 3.3.0 along with CMake install) (#113)
outline to add libressl testing

add missing arg

fix bad copy paste

adding cmake option for openssl versus libressl

explicit directory

set cmake dirs

used seperate build folder + make directly

trying autotools

download cmake module

typo

link against correct ssl target

force openssl 1.0 API when using libressl

add missing macro

make sure to configure ssl error tests based on ssl lib/version

fix compare on min ssl version

fix compare

adding CMake install support to SSL optional

Make sure to copy fin package module

fix fake install path

Update cmake.yml

Update cmake.yml

Update tests/cmake/libressl-is-used.cpp

jwt header now configures itself for libressl (no externly dep on cmake)

this is acompnaied by a docker image to test libressl with

writing sheild.io json to seperate branch

fix bad syntax

make missing dirs

make sure to not overwrite files

add tables to advertise support

only update on push to master
2020-12-13 20:43:24 +01:00
Adam Boseley
bc948489b0 Fix exported cmake include path (#114)
GNUInstallDirs is used before it is defined
2020-12-06 22:08:02 -05:00
Chris Mc
ca110ade5b 🔧 Improved CMake options and macros to prevent collisions (#109)
* exclude any folder prefixed with build

* seeing how far generator expresstion will go

* refactor cmake + outline some tests

* adding missing install destiniation

* rolling back some changes since the workflow was no support by CMake

* adding missing include

* fixing old variable names being used

* using target_compile_definitions instead of options

* correct options for CI + reporting errors for consumer

* using sudo to install

* fix bad variable

* trying CMAKE_PREFIX_PATH

* removing recursive call

* remove options from generators + dedicated exports target

* remove pthread link lib (unused)

* install targets files + include

* add missing main

* remove install prefix

* revive CMAKE_PREFIX_PATH it's really needed

* fix collision on DISABLE_BASE64 + more cmake tests

* bump cmake version + test minimum

* fix job names

* fix bad replace

* fix bad permissions

* fix install of picojson

* adding missing ifndef and overload for pico and no base64

* linting

* test for version

* trying to find version

* [test] remove semver prerelase from CMake

* fixing some documentation issues

* limit cmake test to only related files

* touch up docs

* making sure new helper supports no base64 mode

* some doc fixes

* Update cmake.yml

* Update .github/workflows/cmake.yml

* Update .gitignore
2020-11-29 15:56:53 +01:00
Richard Hozák
2dabd3f3e5 Remove toolchain include (#102)
Toolchain file gets included by CMAKE by default, including it again breaks things.
2020-10-19 17:53:23 +02:00
Chris Mc
ee11e8873e 🔖 set version to 0.5.0-rc.0 (#93) 2020-07-29 20:15:41 +02:00
Dominik Thalhammer
312cb9d74c Allow building examples as subproject and build them by default (#84) 2020-07-16 11:45:59 +02:00
Christopher McArthur
e4eb2d9e49 dont install picojson when it's disabled
closes #68
2020-07-09 21:10:16 -04:00
Chris Mc
22e43afba8 adding coverage testing (#2)
* adding coverage testing

surprisingly:
Overall coverage rate:
  lines......: 80.6% (519 of 644 lines)
  functions..: 92.5% (235 of 254 functions)

* Update coverage.yml
2020-07-05 21:43:09 -04:00
Christopher McArthur
8e909521eb install files base on options 2020-06-10 21:00:58 -04:00
Christopher McArthur
10361407f8 adding option to remove picojson dep 2020-06-10 20:38:22 -04:00
Chris Mc
cb8af09d10 adding option to disable the base64 support 2020-06-07 16:35:19 -04:00
Christopher McArthur
8426dc3e14 running cmake format 2020-06-06 21:22:06 -04:00
Fausto Carvalho
602868558a Adds a find_package to GTest when tests are ON. 2020-05-30 21:54:01 -03:00
Dominik
c9ef90d143 Add cmake option to disable picojson install.
see #68
2020-05-30 22:13:02 +02:00
Christopher McArthur
10a86f528d correcting package version 2020-05-07 17:10:37 -04:00
Tyler Stubenvoll
deadb58c23 Fixed cmake for vendored picojson.
The CMake file was not handling the case of an internal
picojson build, causing include errors in externally
built packages. This was due to an inversion of the
logic.
2020-04-01 13:32:42 -07:00
Dominik Thalhammer
78251c5099 Change minimum openssl versio to 1.0.2 in cmake 2020-03-19 13:47:30 +01:00
Dominik Thalhammer
b57ac3aab4 Fix googletest 2020-03-18 21:39:42 +01:00
Chris Mc
a9df992561 Typo 2020-03-12 23:04:07 -04:00