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
35 
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
jwt::verifier
Definition: jwt.h:3562
jwt::decoded_jwt
Definition: jwt.h:2930
jwt::jwk
JSON Web Key.
Definition: jwt.h:3844
jwt::default_clock
Definition: jwt.h:4150
jwt::jwks
JWK Set.
Definition: jwt.h:4068
jwt::parse_jwk
jwk< json_traits > parse_jwk(const typename json_traits::string_type &token)
Definition: jwt.h:4198
jwt::traits::nlohmann_json::string_type
std::string string_type
Definition: traits.h:17
jwt
JSON Web Token.
Definition: base.h:18
jwt::verify
verifier< Clock, json_traits > verify(Clock c)
Definition: jwt.h:4142
jwt::decode
decoded_jwt< json_traits > decode(const typename json_traits::string_type &token, Decode decode)
Definition: jwt.h:4179
jwt::create
builder< json_traits > create()
Definition: jwt.h:4168
traits.h
jwt::basic_claim
a class to store a generic JSON value as claim
Definition: jwt.h:2473
jwt::parse_jwks
jwks< json_traits > parse_jwks(const typename json_traits::string_type &token)
Definition: jwt.h:4204