Goby3  3.1.5
2024.05.14
defaults.h
Go to the documentation of this file.
1 #ifndef JWT_CPP_NLOHMANN_JSON_DEFAULTS_H
2 #define JWT_CPP_NLOHMANN_JSON_DEFAULTS_H
3 
4 #ifndef JWT_DISABLE_PICOJSON
5 #define JWT_DISABLE_PICOJSON
6 #endif
7 
8 #include "traits.h"
9 
10 namespace jwt
11 {
19 
25 {
26  return verify<default_clock, traits::nlohmann_json>(default_clock{});
27 }
28 
32 inline builder<traits::nlohmann_json> create() { return builder<traits::nlohmann_json>(); }
33 
34 #ifndef JWT_DISABLE_BASE64
42 inline decoded_jwt<traits::nlohmann_json> decode(const std::string& token)
43 {
45 }
46 #endif
47 
59 template <typename Decode>
60 decoded_jwt<traits::nlohmann_json> decode(const std::string& token, Decode decode)
61 {
63 }
64 
72 {
73  return jwk<traits::nlohmann_json>(token);
74 }
75 
83 {
84  return jwks<traits::nlohmann_json>(token);
85 }
86 } // namespace jwt
87 
88 #endif // JWT_CPP_NLOHMANN_JSON_DEFAULTS_H
a class to store a generic JSON value as claim
Definition: jwt.h:2474
JSON Web Key.
Definition: jwt.h:3845
JWK Set.
Definition: jwt.h:4069
JSON Web Token.
Definition: base.h:19
jwk< json_traits > parse_jwk(const typename json_traits::string_type &token)
Definition: jwt.h:4198
builder< json_traits > create()
Definition: jwt.h:4168
jwks< json_traits > parse_jwks(const typename json_traits::string_type &token)
Definition: jwt.h:4204
verifier< Clock, json_traits > verify(Clock c)
Definition: jwt.h:4142
decoded_jwt< json_traits > decode(const typename json_traits::string_type &token, Decode decode)
Definition: jwt.h:4179
std::string string_type
Definition: traits.h:17