You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Create and retrieve issue transitions (status updates)
35
35
* Call every API endpoint of the Jira, even if it is not directly implemented in this library
@@ -92,7 +92,7 @@ func main() {
92
92
### Authentication
93
93
94
94
The `go-jira` library does not handle most authentication directly. Instead, authentication should be handled within
95
-
an `http.Client`. That client can then be passed into the `NewClient` function when creating a jira client.
95
+
an `http.Client`. That client can then be passed into the `NewClient` function when creating a jira client.
96
96
97
97
For convenience, capability for basic and cookie-based authentication is included in the main library.
98
98
@@ -118,11 +118,20 @@ func main() {
118
118
}
119
119
```
120
120
121
+
#### Bearer - Personal Access Tokens (self-hosted Jira)
122
+
123
+
For **self-hosted Jira** (v8.14 and later), Personal Access Tokens (PATs) were introduced.
124
+
Similar to the API tokens, PATs are a safe alternative to using username and password for authentication with scripts and integrations.
125
+
PATs use the Bearer authentication scheme.
126
+
Read more about Jira PATs [here](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html).
127
+
128
+
See [examples/bearerauth](onpremise/examples/bearerauth/main.go) for how to use the Bearer authentication scheme with Jira in Go.
129
+
121
130
#### Basic (self-hosted Jira)
122
131
123
132
Password-based API authentication works for self-hosted Jira **only**, and has been [deprecated for users of Atlassian Cloud](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/).
124
133
125
-
The above token authentication example may be used, substituting a user's password for a generated token.
134
+
Depending on your version of Jira, either of the above token authentication examples may be used, substituting a user's password for a generated token.
126
135
127
136
#### Authenticate with OAuth
128
137
@@ -223,6 +232,7 @@ func main() {
223
232
fmt.Printf("Status after transition: %+v\n", issue.Fields.Status.Name)
224
233
}
225
234
```
235
+
226
236
### Get all the issues for JQL with Pagination
227
237
228
238
Jira API has limit on maxResults it can return. You may have a usecase where you need to get all issues for given JQL.
@@ -354,6 +364,7 @@ You can read more about them at https://blog.developer.atlassian.com/cloud-ecosy
0 commit comments