By providing a refresh token, obtained with the swh auth login
command to the new authenticate method of the client, all emitted requests
will be authenticated using a bearer token sent in headers.
Example of use:
from swh.web.client import WebAPIClient REFRESH_TOKEN = '.......' # Use "swh auth login" command to get it client = WebAPIClient() client.authenticate(REFRESH_TOKEN) # All requests to the Web API will be authenticated resp = client.get('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6')
Depends on D2861
Related to T1927