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
Copy file name to clipboardexpand all lines: docs/examples.rst
+47-14
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ Here's a quick usage example:
8
8
9
9
.. literalinclude:: ../examples/basic_use.py
10
10
11
-
Another example shows how to authenticate with your Jira username and password:
11
+
Another example with methods to authenticate with your Jira:
12
12
13
-
.. literalinclude:: ../examples/basic_auth.py
13
+
.. literalinclude:: ../examples/auth.py
14
14
15
15
This example shows how to work with GreenHopper:
16
16
@@ -23,7 +23,7 @@ Quickstart
23
23
Initialization
24
24
--------------
25
25
26
-
Everything goes through the ``JIRA`` object, so make one::
26
+
Everything goes through the :py:class:`jira.client.JIRA` object, so make one::
27
27
28
28
from jira import JIRA
29
29
@@ -40,49 +40,56 @@ Authentication
40
40
--------------
41
41
42
42
At initialization time, jira-python can optionally create an HTTP BASIC or use OAuth 1.0a access tokens for user
43
-
authentication. These sessions will apply to all subsequent calls to the ``JIRA`` object.
43
+
authentication. These sessions will apply to all subsequent calls to the :py:class:`jira.client.JIRA` object.
44
44
45
45
The library is able to load the credentials from inside the ~/.netrc file, so put them there instead of keeping them in your source code.
46
46
47
47
Cookie Based Authentication
48
48
^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
49
50
+
.. warning::
51
+
This method of authentication is no longer supported on Jira Cloud. You can find the deprecation notice `here <https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth>`_.
52
+
53
+
For Jira Cloud use the basic_auth= :ref:`basic-auth-api-token` authentication
54
+
50
55
Pass a tuple of (username, password) to the ``auth`` constructor argument::
51
56
52
57
auth_jira = JIRA(auth=('username', 'password'))
53
58
54
59
Using this method, authentication happens during the initialization of the object. If the authentication is successful,
55
60
the retrieved session cookie will be used in future requests. Upon cookie expiration, authentication will happen again transparently.
56
61
57
-
.. warning::
58
-
This method of authentication is no longer supported on Jira Cloud. You can find the deprecation notice `here <https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth>`_.
59
-
60
-
For Jira Cloud use the basic_auth= :ref:`basic-auth-api-token` authentication
61
62
62
63
HTTP BASIC
63
64
^^^^^^^^^^
64
65
65
66
(username, password)
66
67
""""""""""""""""""""
67
68
68
-
Pass a tuple of (username, password) to the ``basic_auth`` constructor argument::
This method of authentication is no longer supported on Jira Cloud. You can find the deprecation notice `here <https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth>`_
74
71
75
-
For Jira Cloud use the basic_auth= :ref:`basic-auth-api-token` authentication
72
+
For Jira Cloud use the basic_auth= :ref:`basic-auth-api-token` authentication.
73
+
For Self Hosted Jira (Server, Data Center), consider the `Token Auth`_ authentication.
74
+
75
+
Pass a tuple of (username, password) to the ``basic_auth`` constructor argument::
0 commit comments