Expand description
Which request headers carry a token, per integration kind. Pure: no I/O, so every scheme is a table-test row.
| Kind | Header(s) |
|---|---|
| github* | Authorization: Bearer <token> |
| gitlab* | PRIVATE-TOKEN: <token> + Authorization: Bearer <token> |
| azure_devops* | Authorization: Basic b64(":" + token) |
| bitbucket | Authorization: Basic b64(account + ":" + token); empty account: Bearer (workspace / repository access tokens) |
| gitea, forgejo | Authorization: token <token> |
| bitbucket_data_center, jira_data_center | Authorization: Bearer <token> |
| jira_cloud | Authorization: Basic b64(account + ":" + token) |
| linear | Authorization: <api key> (no Bearer) |
| youtrack | Authorization: Bearer <permanent token> |
| redmine | X-Redmine-API-Key: <api key> |
| gerrit | Authorization: Basic b64(account + ":" + HTTP password) |
| trello | Authorization: OAuth oauth_consumer_key="<account>", oauth_token="<token>" |
A Jira Cloud profile with no account still yields a (useless) Basic header: the host answers 401 and the form asks for the email, rather than this layer inventing a second error path.
Functions§
- auth_
headers - The headers that authenticate
tokenforintegration. - base64
- RFC 4648 base64 with padding. Twenty lines beat a dependency.
- git_
username - The user name git’s HTTPS transport sends together with
tokenforkind, orNonefor a kind that is not a code host (issue trackers, a folder of notes). Pure, so every host is a table-test row.