diff --git a/TUTORIAL.md b/TUTORIAL.md index 51f8082..3f3138a 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -62,11 +62,18 @@ OSIDB uses token (JWT) authentication on most of the endpoints. Bindings handles session = osidb_bindings.new_session(osidb_server_uri="http://localhost:8000/") ``` -Some operations mentioned in [operations section](#session-operations) (mainly unsafe operations which creates or modify content) will require Bugzilla API key to work properly. Valid Bugzilla API key is provided via `BUGZILLA_API_KEY` environment variable. +Some operations mentioned in [operations section](#session-operations) (mainly unsafe operations which creates or modify content) will require Bugzilla API key or Jira Access Token to work properly. -```bash -export BUGZILLA_API_KEY="bugzilla api key" -``` +* Valid Bugzilla API key is provided via `BUGZILLA_API_KEY` environment variable. + + ```bash + export BUGZILLA_API_KEY="bugzilla api key" + ``` +* Valid Jira Access Token is provided via `JIRA_ACCESS_TOKEN` environment variable. + + ```bash + export JIRA_ACCESS_TOKEN="jira access token" + ``` The SSL verification is enabled by the default and in order to work properly you should export the `REQUESTS_CA_BUNDLE` environment variable to point to the location with the proper CA bundle. For example: diff --git a/osidb_bindings/session.py b/osidb_bindings/session.py index 381cb95..ed54367 100644 --- a/osidb_bindings/session.py +++ b/osidb_bindings/session.py @@ -116,6 +116,7 @@ def __init__(self, base_url, auth=None, verify_ssl=True): headers={ "User-Agent": OSIDB_BINDINGS_USERAGENT, "Bugzilla-Api-Key": get_env("BUGZILLA_API_KEY", ""), + "Jira-Api-Key": get_env("JIRA_ACCESS_TOKEN", ""), }, verify_ssl=verify_ssl, )