def decode_token(self, token): try: return jwt.decode(token, key=self.secret, algorithms=self.algorithm) except jwt.DecodeError: return False