def __call__ ( self , r ) : r . headers [ 'Authorization' ] = 'JWT {jwt}' . format ( jwt = self . token ) return r
python flask request set authorization headers
Update the request headers .
def __call__(self, r):
        """Update the request headers."""
        r.headers['Authorization'] = 'JWT {jwt}'.format(jwt=self.token)
        return r