The following authentication methods are supported for the Jira Service Management REST APIs:
Recommended:
OAuth 2.0 - This method provides APIs to allow external services to access resources on a user's behalf with the OAuth 2.0 protocol. This protocol is not compatible with Oauth 1.0a.
Personal access token (PAT) - This method incorporates the user account in the access token. It is a safe alternative to using username and password for authentication with various services.
Other:
OAuth 1.0a - This method provides APIs to allow external services to access resources on a user's behalf with the OAuth 1.0 protocol. This protocol is deprecated.
Basic HTTP - This method is only recommended for tools like scripts or bots. It is easier to implement but much less secure.
Jira uses cookie-based authentication in the browser, so you can call the REST API from Javascript on the page and rely on the authentication the browser has established. To reproduce the behavior of the Jira log-in page, you can POST to the /auth/1/sessionresource. You can use it, for example, to display authentication error messages to users.