Skip to content

Commit

Permalink
Merge pull request ahungry#292 from sochotnicky/add-bearer-token-docs
Browse files Browse the repository at this point in the history
Document usage of Bearer tokens for authentication
  • Loading branch information
ahungry committed Apr 13, 2022
2 parents 4e0c8c6 + b25117b commit 502de6d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,24 @@ The self-hosted version of Jira appears to still support Basic Authentication wi

https://developer.atlassian.com/server/jira/platform/basic-authentication/

#### Using Bearer authentication with Personal Access Tokens

Some JIRA instances might require usage of Authorization headers using Bearer
tokens as documented in [Using
PATs](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html#UsingPersonalAccessTokens-UsingPATs)
Atlassian documentation.

As documented, PATs should be used without a username in Authorization header as
Bearer tokens. Following is an example of using PAT token stored in `authinfo`
to authenticate to JIRA:

```lisp
(setq jiralib-token
(cons "Authorization"
(concat "Bearer " (auth-source-pick-first-password
:host "jira.company.com"))))
```

#### Last Resort Authorization workaround (NOT secure)
However, if all else fails (your Jira instance has disabled basic auth
entirely), you can still get in by copying your web browser's
Expand Down

0 comments on commit 502de6d

Please sign in to comment.