Hi, I am currently using the ‘AccessToken’ option for authorization via swagger generated Python API version 1.21.10 as follows:
gitea_config = giteapy.Configuration()
gitea_config.host = f'{self.__gitea_url}/api/v1'
gitea_config.api_key['access_token'] = get_gitea_app_token()
api_client = giteapy.ApiClient(gitea_config)
This variant works as expected. But since it is marked as deprecated, I would like to switch to the AuthorizationHeaderToken. Unfortunately I didn’t succeed with these two variants:
gitea_config = giteapy.Configuration()
gitea_config.host = f'{self.__gitea_url}/api/v1'
#gitea_config.api_key['Authorization'] = f"get_gitea_app_token()}"
gitea_config.api_key['Authorization'] = f"token {get_gitea_app_token()}"
api_client = giteapy.ApiClient(gitea_config)
What have I forgotten or do I need to change so that authentication via AuthorizationHeaderToken is successful?
Thanks, Heiko