def METHOD_NAME(self, username, password):
    p_headers = self._HEADERS.copy()
    p_headers['Content-Type'] = 'application/json'
    self._HEADERS['Authorization'] = 'Bearer ' + self._download_json(
        self._API_BASE + 'login',
        None, 'Logging in', data=json.dumps({
            'id': username,
            'secret': password,
        }).encode(), headers=p_headers)['authorisationToken']