Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Thalhammer/jwt-cpp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.0
Choose a base ref
...
head repository: Thalhammer/jwt-cpp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 7, 2020

  1. Copy the full SHA
    10a86f5 View commit details

Commits on May 9, 2020

  1. Merge pull request #67 from prince-chrismc/master

    Correcting CMakeLists.txt to sport the latest release version
    Thalhammer authored May 9, 2020
    Copy the full SHA
    1663f72 View commit details

Commits on May 16, 2020

  1. Create traits.h

    prince-chrismc authored May 16, 2020
    Copy the full SHA
    c1cfb73 View commit details
  2. Update traits.h

    prince-chrismc authored May 16, 2020
    Copy the full SHA
    c5663f5 View commit details
  3. Update traits.h

    prince-chrismc authored May 16, 2020
    Copy the full SHA
    b7ed684 View commit details

Commits on May 17, 2020

  1. wip

    low laptop battery
    prince-chrismc committed May 17, 2020
    Copy the full SHA
    494cb2c View commit details

Commits on May 19, 2020

  1. tester that compiles

    prince-chrismc committed May 19, 2020
    Copy the full SHA
    56ffe08 View commit details

Commits on May 20, 2020

  1. Copy the full SHA
    45ccd61 View commit details
  2. traits v2

    prince-chrismc committed May 20, 2020
    Copy the full SHA
    41d767d View commit details
  3. Copy the full SHA
    f5e3716 View commit details
  4. Copy the full SHA
    767c3fc View commit details
  5. Copy the full SHA
    b3de79d View commit details
  6. Copy the full SHA
    f45db90 View commit details
  7. Copy the full SHA
    44592ae View commit details
  8. removing duplication

    prince-chrismc committed May 20, 2020
    Copy the full SHA
    8ec4bfb View commit details

Commits on May 21, 2020

  1. Copy the full SHA
    cb9165b View commit details
  2. Copy the full SHA
    8ba9dc1 View commit details
  3. Copy the full SHA
    474a870 View commit details

Commits on May 22, 2020

  1. Copy the full SHA
    ddffc6c View commit details
  2. adding extra check

    low laptop battery rip me
    prince-chrismc committed May 22, 2020
    Copy the full SHA
    659de08 View commit details
  3. Copy the full SHA
    486102e View commit details

Commits on May 23, 2020

  1. Copy the full SHA
    f6d8c6b View commit details

Commits on May 24, 2020

  1. adding serialize trait

    prince-chrismc committed May 24, 2020
    Copy the full SHA
    e1d2f58 View commit details
  2. more generics

    prince-chrismc committed May 24, 2020
    Copy the full SHA
    146e677 View commit details

Commits on May 26, 2020

  1. Copy the full SHA
    bcd7e3f View commit details
  2. revert test

    prince-chrismc committed May 26, 2020
    Copy the full SHA
    9afe25a View commit details
  3. using a fwd decl

    prince-chrismc committed May 26, 2020
    Copy the full SHA
    88c4886 View commit details
  4. Copy the full SHA
    089d901 View commit details
  5. sanity check for type

    prince-chrismc committed May 26, 2020
    Copy the full SHA
    59f7b87 View commit details
  6. remove extra header

    prince-chrismc committed May 26, 2020
    Copy the full SHA
    860e56e View commit details
  7. Copy the full SHA
    5177c86 View commit details
  8. Revert "[skip ci] attempting to decay func args..."

    This reverts commit 5177c86.
    prince-chrismc committed May 26, 2020
    Copy the full SHA
    041fd12 View commit details

Commits on May 28, 2020

  1. find package for GTest

    prince-chrismc committed May 28, 2020
    Copy the full SHA
    b6e1d4d View commit details
  2. Copy the full SHA
    f271133 View commit details
  3. fixing test

    prince-chrismc committed May 28, 2020
    Copy the full SHA
    b0161d8 View commit details

Commits on May 29, 2020

  1. Copy the full SHA
    07af20d View commit details
  2. Copy the full SHA
    1cfcad2 View commit details
  3. Copy the full SHA
    76aac93 View commit details

Commits on May 30, 2020

  1. Copy the full SHA
    9f4a217 View commit details
  2. Copy the full SHA
    c0128d1 View commit details
  3. Copy the full SHA
    ceb6e17 View commit details
  4. Copy the full SHA
    ddf0988 View commit details
  5. 3
    Copy the full SHA
    fd6cec9 View commit details
  6. Copy the full SHA
    c9ef90d View commit details
  7. Copy the full SHA
    5d3624b View commit details
  8. some clang tidy fixes

    prince-chrismc committed May 30, 2020
    Copy the full SHA
    44076a8 View commit details

Commits on May 31, 2020

  1. Copy the full SHA
    6028685 View commit details
  2. Copy the full SHA
    739b7cd View commit details
  3. Copy the full SHA
    cdbc116 View commit details

Commits on Jun 3, 2020

  1. Merge pull request #70 from faustocarva/put_gtest_on_cmake

    Adds a find_package to GTest when tests are ON.
    Thalhammer authored Jun 3, 2020
    Copy the full SHA
    72553b2 View commit details
Showing with 13,325 additions and 2,051 deletions.
  1. +22 −0 .clang-format
  2. +41 −0 .clang-tidy
  3. +208 −0 .cmake-format
  4. +17 −0 .editorconfig
  5. +2 −0 .github/FUNDING.yml
  6. +83 −0 .github/ISSUE_TEMPLATE/bug-report.yml
  7. +20 −0 .github/ISSUE_TEMPLATE/feature-request.yml
  8. +20 −0 .github/ISSUE_TEMPLATE/support-question.yml
  9. +31 −0 .github/actions/badge/action.yml
  10. +18 −0 .github/actions/badge/publish/action.yml
  11. +24 −0 .github/actions/badge/write/action.yml
  12. +17 −0 .github/actions/install/boost-json/action.yml
  13. +39 −0 .github/actions/install/cmake/action.yml
  14. +18 −0 .github/actions/install/danielaparker-jsoncons/action.yml
  15. +15 −0 .github/actions/install/gtest/action.yml
  16. +17 −0 .github/actions/install/kazuho-picojson/action.yml
  17. +19 −0 .github/actions/install/libressl/action.yml
  18. +18 −0 .github/actions/install/nlohmann-json/action.yml
  19. +22 −0 .github/actions/install/open-source-parsers-jsoncpp/action.yml
  20. +21 −0 .github/actions/install/openssl/action.yml
  21. +22 −0 .github/actions/install/wolfssl/action.yml
  22. +26 −0 .github/actions/process-linting-results/action.yml
  23. +67 −0 .github/actions/render/defaults/action.yml
  24. +44 −0 .github/actions/render/tests/action.yml
  25. +16 −0 .github/logo.svg
  26. +21 −0 .github/security.md
  27. +273 −0 .github/workflows/cmake.yml
  28. +33 −0 .github/workflows/cross-platform.yml
  29. +25 −0 .github/workflows/documentation.yml
  30. +95 −0 .github/workflows/jwt.yml
  31. +127 −0 .github/workflows/lint.yml
  32. +44 −0 .github/workflows/release.yml
  33. +113 −0 .github/workflows/ssl.yml
  34. +79 −0 .github/workflows/targets.yml
  35. +85 −0 .github/workflows/traits.yml
  36. +10 −3 .gitignore
  37. +0 −18 .travis.yml
  38. +10 −0 .vscode/extensions.json
  39. +155 −51 CMakeLists.txt
  40. +33 −0 CMakePresets.json
  41. +114 −62 README.md
  42. +48 −0 cmake/CMakePresets.json
  43. +537 −0 cmake/HunterGate.cmake
  44. +12 −0 cmake/code-coverage.cmake
  45. +14 −6 cmake/jwt-cpp-config.cmake.in
  46. +16 −0 cmake/private-find-boost-json.cmake
  47. +10 −0 cmake/private-find-kazuho-picojson.cmake
  48. +0 −5 debian/.gitignore
  49. +0 −29 debian/changelog
  50. +0 −1 debian/compat
  51. +0 −16 debian/control
  52. +0 −35 debian/copyright
  53. +0 −6 debian/rules
  54. +0 −1 debian/source/format
  55. +1 −0 docs/.gitignore
  56. +23 −0 docs/CMakeLists.txt
  57. +695 −332 { → docs}/Doxyfile
  58. +74 −0 docs/faqs.md
  59. +72 −0 docs/install.md
  60. +26 −0 docs/overrides.css
  61. +33 −0 docs/signing.md
  62. +43 −0 docs/ssl.md
  63. +107 −0 docs/traits.md
  64. +35 −5 example/CMakeLists.txt
  65. +32 −0 example/CMakePresets.json
  66. +0 −8 example/README.md
  67. +41 −0 example/es256k.cpp
  68. +138 −0 example/jwks-verify.cpp
  69. +95 −0 example/partial-claim-verifier.cpp
  70. +7 −5 example/print-claims.cpp
  71. +49 −0 example/private-claims.cpp
  72. +45 −0 example/rsa-create.cpp
  73. +41 −0 example/rsa-verify.cpp
  74. +36 −0 example/traits/CMakeLists.txt
  75. +6 −0 example/traits/README.md
  76. +52 −0 example/traits/boost-json.cpp
  77. +47 −0 example/traits/danielaparker-jsoncons.cpp
  78. +47 −0 example/traits/kazuho-picojson.cpp
  79. +47 −0 example/traits/nlohmann-json.cpp
  80. +47 −0 example/traits/open-source-parsers-jsoncpp.cpp
  81. +294 −148 include/jwt-cpp/base.h
  82. +3,486 −855 include/jwt-cpp/jwt.h
  83. +91 −0 include/jwt-cpp/traits/boost-json/defaults.h
  84. +84 −0 include/jwt-cpp/traits/boost-json/traits.h
  85. +91 −0 include/jwt-cpp/traits/danielaparker-jsoncons/defaults.h
  86. +133 −0 include/jwt-cpp/traits/danielaparker-jsoncons/traits.h
  87. +93 −0 include/jwt-cpp/traits/defaults.h.mustache
  88. +87 −0 include/jwt-cpp/traits/kazuho-picojson/defaults.h
  89. +80 −0 include/jwt-cpp/traits/kazuho-picojson/traits.h
  90. +91 −0 include/jwt-cpp/traits/nlohmann-json/defaults.h
  91. +81 −0 include/jwt-cpp/traits/nlohmann-json/traits.h
  92. +93 −0 include/jwt-cpp/traits/open-source-parsers-jsoncpp/defaults.h
  93. +140 −0 include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h
  94. +34 −8 include/picojson/picojson.h
  95. +29 −0 nuget/jwt-cpp.nuspec
  96. +8 −0 nuget/jwt-cpp.targets
  97. +77 −1 tests/BaseTest.cpp
  98. +79 −13 tests/CMakeLists.txt
  99. +146 −0 tests/CMakePresets.json
  100. +97 −22 tests/ClaimTest.cpp
  101. +198 −10 tests/HelperTest.cpp
  102. +161 −0 tests/JwksTest.cpp
  103. +232 −0 tests/Keys.cpp
  104. +1,393 −0 tests/OpenSSLErrorTest.cpp
  105. +2 −3 tests/TestMain.cpp
  106. +22 −2 tests/TokenFormatTest.cpp
  107. +593 −347 tests/TokenTest.cpp
  108. +9 −0 tests/cmake/CMakeLists.txt
  109. +10 −0 tests/cmake/base64-is-disabled.cpp
  110. +6 −0 tests/cmake/defaults-enabled.cpp
  111. +13 −0 tests/cmake/libressl-is-used.cpp
  112. +10 −0 tests/cmake/picojson-is-disabled.cpp
  113. +18 −0 tests/cmake/wolfssl-is-used.cpp
  114. +13 −0 tests/fuzz/BaseDecodeFuzz.cpp
  115. +9 −0 tests/fuzz/BaseEncodeFuzz.cpp
  116. +24 −0 tests/fuzz/CMakeLists.txt
  117. +27 −0 tests/fuzz/TokenDecodeFuzz.cpp
  118. +1 −0 tests/fuzz/decode-corpus/086a3aa337038cac8a75a05131444f222e48aee8
  119. +1 −0 tests/fuzz/decode-corpus/8ebaef2304e91465585c8d7fcf4d9f939e08d6b4
  120. +1 −0 tests/fuzz/decode-corpus/ba528234d9f6949ed9c9626c08a782f6e7c15b8b
  121. +1 −0 tests/fuzz/decode-corpus/de1028a3fe87471f027522c3ed9ec02b8364a006
  122. +1 −0 tests/fuzz/decode-corpus/e8f531caaa67cecb1c7b162f3e1d4e320d79befd
  123. +1 −0 tests/fuzz/token-corpus/9d891e731f75deae56884d79e9816736b7488080
  124. +1 −0 tests/fuzz/token-corpus/ff384e2421a333cd52f259cec14c7f790d595db9
  125. +1 −0 tests/fuzz/token-corpus/valid-sample
  126. +141 −0 tests/traits/BoostJsonTest.cpp
  127. +147 −0 tests/traits/JsonconsTest.cpp
  128. +141 −0 tests/traits/NlohmannTest.cpp
  129. +147 −0 tests/traits/OspJsoncppTest.cpp
  130. +147 −0 tests/traits/TraitsTest.cpp.mustache
  131. +0 −5 vcpkg/CONTROL
  132. +0 −31 vcpkg/fix-warning.patch
  133. +0 −23 vcpkg/portfile.cmake
22 changes: 22 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
BasedOnStyle: LLVM
BreakBeforeBraces: Attach

ColumnLimit: 120 # Match GitHub UI

UseTab: Always
TabWidth: 4
IndentWidth: 4
AccessModifierOffset: -4
ContinuationIndentWidth: 4
NamespaceIndentation: All
IndentCaseLabels: false

PointerAlignment: Left
AlwaysBreakTemplateDeclarations: Yes
SpaceAfterTemplateKeyword: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortBlocksOnASingleLine: Always

FixNamespaceComments: true
ReflowComments: false
41 changes: 41 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Checks: '-*,
bugprone-*,
cert-*,
clang-analyzer-*,
clang-diagnostic-*,
-clang-diagnostic-c++17-extensions,
google-*,
-google-runtime-references,
-google-readability-braces-around-statements,
hicpp-*,
-hicpp-braces-around-statements,
-hicpp-signed-bitwise,
misc-*,
-misc-non-private-member-variables-in-classes,
llvm-*,
modernize-*,
-modernize-use-trailing-return-type,
performance-*,
portability-*,
readability-*,
-readability-magic-numbers,
-readability-braces-around-statements,
-readability-uppercase-literal-suffix'

CheckOptions:
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.StructCase
value: lower_case
- key: readability-identifier-naming.ClassCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase
value: lower_case
208 changes: 208 additions & 0 deletions .cmake-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
# ----------------------------------
# Options affecting listfile parsing
# ----------------------------------
with section("parse"):

# Specify structure for custom cmake functions
additional_commands = { 'foo': { 'flags': ['BAR', 'BAZ'],
'kwargs': {'DEPENDS': '*', 'HEADERS': '*', 'SOURCES': '*'}}}

# -----------------------------
# Options effecting formatting.
# -----------------------------
with section("format"):

# How wide to allow formatted cmake files
line_width = 120

# How many spaces to tab for indent
tab_size = 2

# If an argument group contains more than this many sub-groups (parg or kwarg
# groups) then force it to a vertical layout.
max_subgroups_hwrap = 12

# If a positional argument group contains more than this many arguments, then
# force it to a vertical layout.
max_pargs_hwrap = 24

# If true, separate flow control names from their parentheses with a space
separate_ctrl_name_with_space = False

# If true, separate function names from parentheses with a space
separate_fn_name_with_space = False

# If a statement is wrapped to more than one line, than dangle the closing
# parenthesis on its own line.
dangle_parens = False

# If the trailing parenthesis must be 'dangled' on its on line, then align it
# to this reference: `prefix`: the start of the statement, `prefix-indent`:
# the start of the statement, plus one indentation level, `child`: align to
# the column of the arguments
dangle_align = 'prefix'

# If the statement spelling length (including space and parenthesis) is
# smaller than this amount, then force reject nested layouts.
min_prefix_chars = 4

# If the statement spelling length (including space and parenthesis) is larger
# than the tab width by more than this amount, then force reject un-nested
# layouts.
max_prefix_chars = 10

# If a candidate layout is wrapped horizontally but it exceeds this many
# lines, then reject the layout.
max_lines_hwrap = 12

# What style line endings to use in the output.
line_ending = 'unix'

# Format command names consistently as 'lower' or 'upper' case
command_case = 'lower'

# Format keywords consistently as 'lower' or 'upper' case
keyword_case = 'upper'

# A list of command names which should always be wrapped
always_wrap = []

# If true, the argument lists which are known to be sortable will be sorted
# lexicographicall
enable_sort = True

# If true, the parsers may infer whether or not an argument list is sortable
# (without annotation).
autosort = False

# By default, if cmake-format cannot successfully fit everything into the
# desired linewidth it will apply the last, most agressive attempt that it
# made. If this flag is True, however, cmake-format will print error, exit
# with non-zero status code, and write-out nothing
require_valid_layout = False

# A dictionary mapping layout nodes to a list of wrap decisions. See the
# documentation for more information.
layout_passes = {}

# ------------------------------------------------
# Options affecting comment reflow and formatting.
# ------------------------------------------------
with section("markup"):

# What character to use for bulleted lists
bullet_char = '*'

# What character to use as punctuation after numerals in an enumerated list
enum_char = '.'

# If comment markup is enabled, don't reflow the first comment block in each
# listfile. Use this to preserve formatting of your copyright/license
# statements.
first_comment_is_literal = False

# If comment markup is enabled, don't reflow any comment block which matches
# this (regex) pattern. Default is `None` (disabled).
literal_comment_pattern = None

# Regular expression to match preformat fences in comments
# default=r'^\s*([`~]{3}[`~]*)(.*)$'
fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'

# Regular expression to match rulers in comments
# default=r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'
ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'

# If a comment line matches starts with this pattern then it is explicitly a
# trailing comment for the preceeding argument. Default is '#<'
explicit_trailing_pattern = '#<'

# If a comment line starts with at least this many consecutive hash
# characters, then don't lstrip() them off. This allows for lazy hash rulers
# where the first hash char is not separated by space
hashruler_min_length = 10

# If true, then insert a space between the first hash char and remaining hash
# chars in a hash ruler, and normalize its length to fill the column
canonicalize_hashrulers = True

# enable comment markup parsing and reflow
enable_markup = True

# ----------------------------
# Options affecting the linter
# ----------------------------
with section("lint"):

# a list of lint codes to disable
disabled_codes = []

# regular expression pattern describing valid function names
function_pattern = '[0-9a-z_]+'

# regular expression pattern describing valid macro names
macro_pattern = '[0-9A-Z_]+'

# regular expression pattern describing valid names for variables with global
# scope
global_var_pattern = '[0-9A-Z][0-9A-Z_]+'

# regular expression pattern describing valid names for variables with global
# scope (but internal semantic)
internal_var_pattern = '_[0-9A-Z][0-9A-Z_]+'

# regular expression pattern describing valid names for variables with local
# scope
local_var_pattern = '[0-9a-z_]+'

# regular expression pattern describing valid names for privatedirectory
# variables
private_var_pattern = '_[0-9a-z_]+'

# regular expression pattern describing valid names for publicdirectory
# variables
public_var_pattern = '[0-9A-Z][0-9A-Z_]+'

# regular expression pattern describing valid names for keywords used in
# functions or macros
keyword_pattern = '[0-9A-Z_]+'

# In the heuristic for C0201, how many conditionals to match within a loop in
# before considering the loop a parser.
max_conditionals_custom_parser = 2

# Require at least this many newlines between statements
min_statement_spacing = 1

# Require no more than this many newlines between statements
max_statement_spacing = 1
max_returns = 6
max_branches = 12
max_arguments = 5
max_localvars = 15
max_statements = 50

# -------------------------------
# Options effecting file encoding
# -------------------------------
with section("encode"):

# If true, emit the unicode byte-order mark (BOM) at the start of the file
emit_byteorder_mark = False

# Specify the encoding of the input file. Defaults to utf-8
input_encoding = 'utf-8'

# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
# only claims to support utf-8 so be careful when using anything else
output_encoding = 'utf-8'

# -------------------------------------
# Miscellaneous configurations options.
# -------------------------------------
with section("misc"):

# A dictionary containing any per-command configuration overrides. Currently
# only `command_case` is supported.
per_command = {}

17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[!*.{h,cpp}]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{h,cpp}]
indent_style = tab
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [Thalhammer,prince-chrismc]
patreon: Thalhammer
83 changes: 83 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Bug Report 🐛
description: File a bug report

labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen? Feel free to include some screenshots
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: How To Reproduce?
description: Please provide a small snippet to reproduce the issue
placeholder: Some C++ code or Shell code to recreate th problem
value: |
```c++
#include "jwt-cpp/jwt.h"
int main() {
return 0;
}
```
- type: dropdown
id: version
attributes:
label: Version
description: What version of our software are you running?
options:
- 0.7.0
- 0.6.0
- 0.5.2
- Older (please let us know if the "What happened" box)
validations:
required: true
- type: dropdown
id: operating-system
attributes:
label: What OS are you seeing the problem on?
multiple: true
options:
- Windows
- Linux
- MacOS
- Other (please let us know if the "What happened" box)
validations:
required: true
- type: dropdown
id: compiler
attributes:
label: What compiler are you seeing the problem on?
multiple: true
options:
- GCC
- Clang
- MSVC
- Other (please let us know if the "What happened" box)
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
options:
- label: I agree to follow this project's Code of Conduct
required: true
Loading