def token_exchange(self, code=None, redirect_uri=None, grant_type='authorization_code', **kwargs):
        client_id = self.client.configuration['client.id']
        client_secret = self.client.configuration['client.secret']

        if not client_id or not client_secret: