Beispiel #1
0
 def topic(self, topic):
     """ Set clock and verify token with minted key """
     clock, sjwt = topic
     clock_load(clock)
     pubk = None if keyless else generated_keys[alg]
     return jwt.verify_jwt(sjwt, pubk, ['none'] if keyless else [alg],
                           timedelta(seconds=iat_skew))
Beispiel #2
0
 def topic(self, topic):
     """ Set clock and verify token """
     clock, sjwt = topic
     clock_load(clock)
     if callable(pubk):
         return pubk(sjwt, timedelta(seconds=iat_skew))
     return jwt.verify_jwt(sjwt, pubk, ['none'] if keyless else [alg],
                           timedelta(seconds=iat_skew))
 def topic(self, topic):
     """ Verify the token without requiring all claims """
     adjust = orig_datetime.utcnow() - orig_datetime.utcfromtimestamp(0)
     clock_tick(-adjust)
     r = jwt.verify_jwt(topic,
                        None,
                        ['RS256', 'none'],
                        iat_skew=adjust,
                        checks_optional=True)
     clock_reset()
     return r
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [])
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, {alg: True})
Beispiel #6
0
 def topic(self, topic):
     """ Verify the token with some public key """
     return jwt.verify_jwt(
         topic, JWK(kty='oct', k=base64url_encode('anysecrethere')))
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, pem_key, ['RS256'])
 def topic(self, topic):
     """ Verify the token with no public key """
     return jwt.verify_jwt(topic)
 def topic(self, topic):
     """ Verify the token with some public key and none alg allowed """
     return jwt.verify_jwt(topic, JWK(kty='oct', k=base64url_encode('anysecrethere')), ['none'])
Beispiel #10
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, pem_key, ['RS256'])
Beispiel #11
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, None, ['RS256', 'none'])
 def topic(self, topic):
     """ Verify token """
     return jwt.verify_jwt(topic, key, [alg])
Beispiel #13
0
 def topic(self, topic):
     """ Verify token with no public key and allow RS256 """
     return jwt.verify_jwt(topic, None, ['RS256'])
Beispiel #14
0
 def topic(self, topic):
     """ Verify the token with no public key """
     return jwt.verify_jwt(topic)
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [a for a in all_algs if a != alg])
Beispiel #16
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, rsa_pub_key)
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [alg], checks_optional=True)
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, None, ['none'])
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, None, ['none'], checks_optional=True)
 def topic(self, topic):
     """ Verify the token with some public key """
     return jwt.verify_jwt(topic, JWK(kty='oct', k=base64url_encode('anysecrethere')))
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, all_algs)
 def topic(self, topic):
     """ Verify token with no public key and allow RS256 """
     return jwt.verify_jwt(topic, None, ['RS256'])
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [a for a in all_algs if a != alg])
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, pub_key)
Beispiel #25
0
 def topic(self, topic):
     """ Verify the token with some public key and none alg allowed """
     return jwt.verify_jwt(
         topic, JWK(kty='oct', k=base64url_encode('anysecrethere')),
         ['none'])