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 @@ -3287,6 +3287,15 @@ namespace jwt {
3287
3287
// / Supported algorithms
3288
3288
std::unordered_map<std::string, std::shared_ptr<algo_base>> algs;
3289
3289
3290
+ void verify_claims (const decoded_jwt<json_traits>& jwt, std::error_code& ec) const {
3291
+ verify_ops::verify_context<json_traits> ctx{clock.now (), jwt, default_leeway};
3292
+ for (auto & c : claims) {
3293
+ ctx.claim_key = c.first ;
3294
+ c.second (ctx, ec);
3295
+ if (ec) return ;
3296
+ }
3297
+ }
3298
+
3290
3299
public:
3291
3300
/* *
3292
3301
* Constructor for building a new verifier instance
@@ -3473,12 +3482,7 @@ namespace jwt {
3473
3482
algs.at (algo)->verify (data, sig, ec);
3474
3483
if (ec) return ;
3475
3484
3476
- verify_ops::verify_context<json_traits> ctx{clock.now (), jwt, default_leeway};
3477
- for (auto & c : claims) {
3478
- ctx.claim_key = c.first ;
3479
- c.second (ctx, ec);
3480
- if (ec) return ;
3481
- }
3485
+ verify_claims (jwt, ec);
3482
3486
}
3483
3487
};
3484
3488
You can’t perform that action at this time.
0 commit comments