Exemplo n.º 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))
Exemplo n.º 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
Exemplo n.º 4
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [])
Exemplo n.º 5
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, {alg: True})
Exemplo n.º 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'])
Exemplo n.º 10
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, pem_key, ['RS256'])
Exemplo n.º 11
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, None, ['RS256', 'none'])
Exemplo n.º 12
0
 def topic(self, topic):
     """ Verify token """
     return jwt.verify_jwt(topic, key, [alg])
Exemplo n.º 13
0
 def topic(self, topic):
     """ Verify token with no public key and allow RS256 """
     return jwt.verify_jwt(topic, None, ['RS256'])
Exemplo n.º 14
0
 def topic(self, topic):
     """ Verify the token with no public key """
     return jwt.verify_jwt(topic)
Exemplo n.º 15
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [a for a in all_algs if a != alg])
Exemplo n.º 16
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, rsa_pub_key)
Exemplo n.º 17
0
 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'])
Exemplo n.º 19
0
 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')))
Exemplo n.º 21
0
 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'])
Exemplo n.º 23
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, key, [a for a in all_algs if a != alg])
Exemplo n.º 24
0
 def topic(self, topic):
     """ Verify the token """
     return jwt.verify_jwt(topic, pub_key)
Exemplo n.º 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'])