Commit graph

99 commits

Author SHA1 Message Date
Carlos Gomes Martinho
67f3dad16a fix: compilation with visual studio 14 2020-02-24 19:54:37 +01:00
Carlos Gomes Martinho
564e9f8d23 build: add support for conan and make vendored json optional 2020-02-24 10:29:57 +01:00
Andrew Wiik
92cac1ecbd Updated tests and README for RFC Fixes 2020-01-16 00:56:41 -05:00
Andrew Wiik
9624da5e59 Fix parsing of alg claim to be RFC compliant
The alg claim should always be treated as a case-sensitive value
according to the RFC spec which you can find here:

https://tools.ietf.org/html/rfc7515#section-4.1.1.

The same RFC spec also says it must be present, if it is empty
it is not present so it should not be converted to the "none"
algo as the "none" algo is an algorithm and not the absence of
one.

Finally the "none" algorithm as a string should be "none" not
"NONE" according to the IANA register for JWS Signature and
Encryption Algorithms which can be found here:

https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
2020-01-16 00:42:50 -05:00
Lander Noterman
8841837fe4
fix clang-cl build on windows 2019-12-09 09:23:37 +01:00
Christos Stratopoulos
b607c4da9e
Make C++ string_view detection work with MSVC
The existing method to check for support of C++17 `string_view` does not work on MSVC, see [here](https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=vs-2019)

Instead we replace with the [feature test macro](https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros) for `string_view`, which is `__cpp_lib_string_view`. This should work on all platforms and is arguably more precise.
2019-10-31 14:44:19 -04:00
Arun Muralidharan
42fcc915e4
Merge pull request #49 from zxey/cpp17-string-view
Use std::string_view if c+17 is available
2019-10-08 14:24:19 +05:30
Lubos Dolezel
4392f4b538 Fix char signedness in DMap 2019-07-13 20:10:20 +02:00
zxey
a5e5a233b7 Use std::string_view if c+17 is available 2019-06-17 17:31:06 +02:00
Arun M
1e9667ae0d update nlohmann json library 2019-05-31 00:45:35 +05:30
leoTlr
4234eea1bf prevent -Wimplicit-fallthrough= warning with gcc 8.2.1 2019-04-04 00:27:39 +02:00
leoTlr
a3a0d9c0ec prevent -Wunused-parameter warning with gcc 8.2.1 2019-04-04 00:26:54 +02:00
Matt Powley
ff21be2947 '__builtin_unreachable' is not available on Windows
Replaced with macro that inserts Windows equivalent
2019-03-21 12:31:02 +00:00
Huang-Ming Huang
74b7b344c6 Add api to supply secret based on decoded payload 2019-02-16 15:36:12 -06:00
Arun M
1cbc5eb5a5 compile error with master #37 2018-11-20 19:08:08 +05:30
Arun Muralidharan
fe2e06141f
Merge pull request #35 from mhfrantz/issue-33/move-semantics.v1
issue-33: Add test showing how to invoke move ctor
2018-11-02 22:34:22 +05:30
Matt Frantz
1b105f4772 SFINAE guard on jwt_object's universal reference constructor
This allows the move constructor to be preferred in some cases.
2018-11-01 13:28:49 -07:00
Arun M
6e27aa4c86 Merge 2018-10-27 12:08:08 +05:30
Arun M
1e588256f4 Narrowing errors compiling for ARM #36 2018-10-27 12:07:06 +05:30
Matt Eastman
8cb5ea3d5e Fix out of bounds read in base64_decode 2018-10-03 17:24:11 -05:00
Arun M
64de7b6f1d Ptential Fix for VS2015 compile fail #27 2018-10-03 22:07:08 +05:30
Arun M
e5ecca4f38 'str_to_type' has a non-throwing exception specification but can still throw #31 2018-09-29 00:24:08 +05:30
Arun M
129731da56 Add option to remove type fromt he jwt_header #26 2018-08-05 15:10:53 +05:30
Arun M
87dcef903f Why does the existence of a signature algorithm entail a required verification? #24 2018-05-31 20:36:07 +05:30
Arun Muralidharan
b1140707cc
Merge pull request #23 from TheQuantumPhysicist/master
Fixed many warnings that appear due to assert not being executed in release mode.
2018-05-31 09:42:51 +05:30
Samer Afach
bef9e9d553 Fix a major error in error_code category checking implementations.
Errors some times don't throw exceptions due to implementation
differences.
2018-05-31 01:49:47 +02:00
Samer Afach
00343347b2 Fixed many warnings that appear due to assert not being executed in
release mode.
2018-05-30 22:44:38 +02:00
Samer Afach
34fdb34b44 Minor to make the code compile with -pedantic-errors flag in g++ 2018-05-21 14:06:48 +02:00
Samer Afach
a9562500a0 More inline definitions to for header files to avoid double definition
problems.
2018-05-20 02:57:13 +02:00
Samer Afach
22856e9da2 Functions made inline because they're in the header. Otherwise multiple
definition errors will appear when this file is included.
2018-05-20 00:47:37 +02:00
Samer Afach
8ef6d055ae Make it possible to only include base64.hpp without having to include
jwt.hpp by adding missing includes to resolve incomplete types.
2018-05-19 21:38:25 +02:00
Samer Afach
1fcfbaac75 Fix more signed/unsigned warnings. 2018-05-19 19:03:46 +02:00
Samer Afach
e5fc25bbe8 Fixed a few warnings about signed and unsigned comparison. 2018-05-19 16:29:12 +02:00
Arun M
99d041deb9 Some tests don't pass #14 2018-05-18 20:26:06 +05:30
Arun M
21c08b636c Compilation issue in VS2017 #12 2018-05-02 23:05:22 +05:30
Arun M
aefef6dce2 Compilation issue in VS2017 #12 2018-05-02 21:51:33 +05:30
Arun M
2cb65f231a Expects the two arrays in file base64.cpp to be in double curly braces on Linux 2018-05-02 21:26:23 +05:30
Arun M
9ddaa092cb Compilation error on VS2017 #11 2018-05-02 12:33:25 +05:30
Arun M
d60dd2c926 Fix tests to compile #9 2018-04-25 12:06:10 +05:30
Arun M
f8f0d37263 Openssl make does not work #5 2018-04-04 14:00:40 +05:30
Arun M
56b5299612 missed derivation from false_type 2018-01-03 15:06:39 +05:30
Arun M
9487758b8c Compilation works with g++ 6.4 2018-01-03 10:59:35 +05:30
Arun M
a5728dd397 use find instead of count on std::set. libc++ has a bug in that count is not cont member function. 2018-01-02 12:04:45 +05:30
Arun M
34f1c18c52 Finished README 2018-01-02 11:45:12 +05:30
Arun M
bcd131bf8e README: updated parameters section 2017-12-30 21:37:08 +05:30
Arun M
6302055db1 Readme changes for example code and fixed header decoding 2017-12-29 16:26:37 +05:30
Arun M
161e5d8753 Add support for additional headers 2017-12-29 14:44:17 +05:30
Arun M
7ddf7ec3e9 Added checks and tests for iat/jti/sub 2017-12-29 01:10:41 +05:30
Arun M
e813a75e27 Remove case insensitive compare for has_claim API 2017-12-28 16:39:49 +05:30
Arun M
98979a55d1 string_view to jwt::string_view 2017-12-27 21:10:43 +05:30