def make_bench_verify_token(alg):
    """ Return function which will generate token for particular algorithm """
    privk = priv_keys[alg].get('default', priv_key)
    token = jwt.generate_jwt(payload, privk, alg, timedelta(days=1))
    def f(_):
        """ Verify token """
        pubk = pub_keys[alg].get('default', pub_key)
        jwt.verify_jwt(token, pubk, [alg])
    return f
def make_bench_verify_token ( alg ) : privk = priv_keys [ alg ] . get ( 'default' , priv_key ) token = jwt . generate_jwt ( payload , privk , alg , timedelta ( days = 1 ) ) def f ( _ ) : pubk = pub_keys [ alg ] . get ( 'default' , pub_key ) jwt . verify_jwt ( token , pubk , [ alg ] ) return f
Return function which will generate token for particular algorithm