def parse_auth_header(self):
        token = request.headers.get(self.auth_header)
        options = {
            'require_exp': True,
        }
        try:
            return jwt.decode(token, self.auth_secret,
                              algorithms=[self.auth_alg], options=options)
        except jwt.InvalidTokenError:
            pass
        except AttributeError:
            # jwt's bug when token is None or int
            # https://github.com/jpadilla/pyjwt/issues/183
            pass
        logger.debug("InvalidToken: %s" % token)
        return None
parse http header auth token
dataset/ETHPy150Open guyskk/flask-restaction/flask_restaction/auth.py/Auth.parse_auth_header