JWT-CPP v0.7.0
A header only library for creating and validating JSON Web Tokens (JWT) in C++
Loading...
Searching...
No Matches
defaults.h
1#ifndef JWT_CPP_OPEN_SOURCE_PARSERS_JSONCPP_DEFAULTS_H
2#define JWT_CPP_OPEN_SOURCE_PARSERS_JSONCPP_DEFAULTS_H
3
4#ifndef JWT_DISABLE_PICOJSON
5#define JWT_DISABLE_PICOJSON
6#endif
7
8#include "traits.h"
9
10namespace jwt {
17 using claim = basic_claim<traits::open_source_parsers_jsoncpp>;
18
23 inline verifier<default_clock, traits::open_source_parsers_jsoncpp> verify() {
24 return verify<default_clock, traits::open_source_parsers_jsoncpp>(default_clock{});
25 }
26
31 inline builder<default_clock, traits::open_source_parsers_jsoncpp> create() {
32 return builder<default_clock, traits::open_source_parsers_jsoncpp>(default_clock{});
33 }
34
35#ifndef JWT_DISABLE_BASE64
43 inline decoded_jwt<traits::open_source_parsers_jsoncpp> decode(const std::string& token) {
44 return decoded_jwt<traits::open_source_parsers_jsoncpp>(token);
45 }
46#endif
47
59 template<typename Decode>
63
70 inline jwk<traits::open_source_parsers_jsoncpp>
71 parse_jwk(const traits::open_source_parsers_jsoncpp::string_type& token) {
72 return jwk<traits::open_source_parsers_jsoncpp>(token);
73 }
74
81 inline jwks<traits::open_source_parsers_jsoncpp>
82 parse_jwks(const traits::open_source_parsers_jsoncpp::string_type& token) {
83 return jwks<traits::open_source_parsers_jsoncpp>(token);
84 }
85
90 using verify_context = verify_ops::verify_context<traits::open_source_parsers_jsoncpp>;
91} // namespace jwt
92
93#endif // JWT_CPP_OPEN_SOURCE_PARSERS_JSONCPP_DEFAULTS_H
Definition jwt.h:2954
JSON Web Token.
Definition base.h:21
verifier< default_clock, traits::boost_json > verify()
Definition defaults.h:23
jwk< json_traits > parse_jwk(const typename json_traits::string_type &jwk_)
Definition jwt.h:4195
jwks< json_traits > parse_jwks(const typename json_traits::string_type &jwks_)
Definition jwt.h:4209
builder< default_clock, traits::boost_json > create()
Definition defaults.h:31
basic_claim< traits::boost_json > claim
a class to store a generic Boost.JSON value as claim
Definition defaults.h:17
decoded_jwt< json_traits > decode(const typename json_traits::string_type &token, Decode decode)
Decode a token. This can be used to to help access important feild like 'x5c' for verifying tokens....
Definition jwt.h:4170
verify_ops::verify_context< traits::boost_json > verify_context
Definition defaults.h:88