def verify(alg):
key = pub_keys[alg].get('<STR_LIT:default>', pub_key)<EOL>def f(sjwt, iat_skew=timedelta()):<EOL><INDENT>"""<STR_LIT>"""<EOL>r = spawn(<EOL>"<STR_LIT>".format(<EOL>now=timegm(datetime.utcnow().utctimetuple()),<EOL>sjwt=json_encode(sjwt),<EOL>iat_skew=iat_skew.total_seconds(),<EOL>key=json_encode(base64url_decode(json_decode(key.export())['<STR_LIT:k>']) if key.is_symmetric else key.export_to_pem()),<EOL>alg=json_encode(alg)),<EOL>True)<EOL>return tuple(r)<EOL><DEDENT>return f<EOL>
return function which can verify token using node-jsjws