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 {
3360
3360
// / Supported algorithms
3361
3361
std::unordered_map<std::string, std::shared_ptr<algo_base>> algs;
3362
3362
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
+
3363
3372
public:
3364
3373
/* *
3365
3374
* Constructor for building a new verifier instance
@@ -3551,12 +3560,7 @@ namespace jwt {
3551
3560
algs.at (algo)->verify (data, sig, ec);
3552
3561
if (ec) return ;
3553
3562
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);
3560
3564
}
3561
3565
};
3562
3566
You can’t perform that action at this time.
0 commit comments