Esempio n. 1
0
 def decode(self, stub):
     try:
         s = URLSafeSerializer(config.SECRET_KEY)
         e = s.loads(stub)
         s = TimestampSigner(config.SECRET_KEY)
         e = s.unsign(e, max_age=config.VERIFY_STUB_EXPIRE)
         return e
     except Exception:
         return None