File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -3360,6 +3360,15 @@ namespace jwt {
33603360 // / Supported algorithms
33613361 std::unordered_map<std::string, std::shared_ptr<algo_base>> algs;
33623362
3363+ void verify_claims (const decoded_jwt<json_traits>& jwt, std::error_code& ec) const {
3364+ verify_ops::verify_context<json_traits> ctx{clock.now (), jwt, default_leeway};
3365+ for (auto & c : claims) {
3366+ ctx.claim_key = c.first ;
3367+ c.second (ctx, ec);
3368+ if (ec) return ;
3369+ }
3370+ }
3371+
33633372 public:
33643373 /* *
33653374 * Constructor for building a new verifier instance
@@ -3551,12 +3560,7 @@ namespace jwt {
35513560 algs.at (algo)->verify (data, sig, ec);
35523561 if (ec) return ;
35533562
3554- verify_ops::verify_context<json_traits> ctx{clock.now (), jwt, default_leeway};
3555- for (auto & c : claims) {
3556- ctx.claim_key = c.first ;
3557- c.second (ctx, ec);
3558- if (ec) return ;
3559- }
3563+ verify_claims (jwt, ec);
35603564 }
35613565 };
35623566
You can’t perform that action at this time.
0 commit comments